Skip to content

Commit d7c2586

Browse files
committed
commit: 175
1 parent 47c0cfa commit d7c2586

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
|---| ----- | -------- | ---------- |
55
|1|[Two Sum](https://leetcode.com/problems/two-sum/) | [JavaScript](./src/two-sum/res.js)|Easy|
66
|2|[Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [JavaScript](./src/add-two-numbers/res.js)|Medium|
7+
|175|[Combine Two Tables](https://leetcode.com/problems/combine-two-tables/)| [SQL](./src/combine-two-tables/res.txt)|Easy|
78
|181|[Employees Earning More Than Their Managers](https://leetcode.com/problems/employees-earning-more-than-their-managers/) | [SQL](./src/employees-earning-more-than-their-managers/res.txt)|Easy|
89
|434|[Number of Segments in a String](https://leetcode.com/problems/number-of-segments-in-a-string/) | [JavaScript](./src/number-of-segments-in-a-string/res.js)|Easy|

src/combine-two-tables/res.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
-- Table: Person
2+
3+
-- +-------------+---------+
4+
-- | Column Name | Type |
5+
-- +-------------+---------+
6+
-- | PersonId | int |
7+
-- | FirstName | varchar |
8+
-- | LastName | varchar |
9+
-- +-------------+---------+
10+
-- PersonId is the primary key column for this table.
11+
-- Table: Address
12+
13+
-- +-------------+---------+
14+
-- | Column Name | Type |
15+
-- +-------------+---------+
16+
-- | AddressId | int |
17+
-- | PersonId | int |
18+
-- | City | varchar |
19+
-- | State | varchar |
20+
-- +-------------+---------+
21+
-- AddressId is the primary key column for this table.
22+
23+
-- 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:
24+
25+
-- FirstName, LastName, City, State
26+
27+
# Write your MySQL query statement below
28+
SELECT a.FirstName, a.LastName, b.City, b.State from Person a left join Address b ON a.PersonId = b.PersonId;

0 commit comments

Comments
 (0)