Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Binary Search
- java
- 파이썬
- 자바
- hash table
- Method
- Tree
- database
- Math
- simulation
- Counting
- Class
- 코테
- string
- dynamic programming
- 구현
- SQL
- Stack
- 코딩테스트
- Number Theory
- Binary Tree
- Data Structure
- Matrix
- array
- two pointers
- bit manipulation
- greedy
- geometry
- sorting
- implement
Archives
- Today
- Total
코린이의 소소한 공부노트
[LeetCode/Easy] 175. Combine Two Tables 본문
1. Input
1) table Person (primary key: personId)
2) table Address (primary key: addressId)
2. Output
1) Person 테이블에 있는 사람 각각에 대한 first name, last name, city, state를 작성한 결과
- personId의 주소가 Address 테이블에 없다면 null을 출력
- 출력 순서는 상관없다.
3. Example
Input:
Output:
4. Code
1) 첫 코드(2023/03/14)
select p.firstName, p.lastName, a.city, a.state
from Address a
right outer join Person p on a.personId = p.personId
'코딩테스트 풀이 > SQL' 카테고리의 다른 글
[LeetCode/Easy] 595. Big Countries (0) | 2023.03.16 |
---|---|
[LeetCode/Easy] 584. Find Customer Referee (0) | 2023.03.16 |
[LeetCode/Easy] 183. Customers Who Never Order (0) | 2023.03.14 |
[LeetCode/Easy] 182. Duplicate Emails (0) | 2023.03.14 |
[LeetCode/Easy] 181. Employees Earning More Than Their Managers (0) | 2023.03.14 |