문제
![](https://velog.velcdn.com/images%2Fcosmos%2Fpost%2Ff5b0af9c-7ab8-4c40-9eb3-19c933f2b58d%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202021-09-16%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%204.57.58.png)
풀이
- Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people
코드
SELECT P.FirstName, P.LastName, A.City, A.State
FROM Person as P
LEFT OUTER JOIN Address as A ON P.PersonId = A.PersonId
결과
![](https://velog.velcdn.com/images%2Fcosmos%2Fpost%2Fcac2f28d-2d14-4d5b-9162-d4e5465fc794%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202021-09-16%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%204.57.40.png)
![](https://velog.velcdn.com/images%2Fcosmos%2Fpost%2F2166b16e-5a0d-4df6-9127-8280b271f782%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202021-09-16%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%204.57.30.png)
출처 && 깃허브
leetcode
github