Skip to content

Commit 6cd2b75

Browse files
refactor 175
1 parent d1132f0 commit 6cd2b75

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

database/_175.sql

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1 @@
1-
-- 175. Combine Two Tables
2-
--
3-
-- Table: Person
4-
--
5-
-- +-------------+---------+
6-
-- | Column Name | Type |
7-
-- +-------------+---------+
8-
-- | PersonId | int |
9-
-- | FirstName | varchar |
10-
-- | LastName | varchar |
11-
-- +-------------+---------+
12-
-- PersonId is the primary key column for this table.
13-
-- Table: Address
14-
--
15-
-- +-------------+---------+
16-
-- | Column Name | Type |
17-
-- +-------------+---------+
18-
-- | AddressId | int |
19-
-- | PersonId | int |
20-
-- | City | varchar |
21-
-- | State | varchar |
22-
-- +-------------+---------+
23-
-- AddressId is the primary key column for this table.
24-
--
25-
-- 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:
26-
--
27-
-- FirstName, LastName, City, State
28-
29-
30-
311
select Person.FirstName, Person.LastName, Address.City, Address.State from Person left join Address on Person.PersonId = Address.PersonId;

0 commit comments

Comments
 (0)