Combine Two Tables Problem & Solution

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: FirstName, LastName, City, State.

See the combine two tables problem on LeetCode.

SQL Solution

SELECT FirstName, LastName, City, State
FROM Person
LEFT JOIN Address ON Person.PersonId = Address.PersonId;

Are you looking for a job?