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
- database
- Data Structure
- 코딩테스트
- Math
- 코테
- array
- Stack
- string
- java
- two pointers
- 구현
- hash table
- dynamic programming
- greedy
- Binary Tree
- 자바
- 파이썬
- Binary Search
- SQL
- sorting
- geometry
- Counting
- Class
- Matrix
- Tree
- Number Theory
- bit manipulation
- simulation
- Method
- implement
Archives
- Today
- Total
코린이의 소소한 공부노트
[LeetCode/Easy] 607. Sales Person 본문
1. Input
1) Table: SalesPerson (primary key: sales_id)

2) Table: Company (primary key: com_id)

3) Table: Orders (primary key: order_id)

2. Output
1) SalesPerson 중에서 이름이 RED인 회사와 아무 연관이 없는 사람들의 이름을 담아 출력
- 출력 순서는 상관 없다.
3. Example


4. Code
1) 첫 코드(2023/03/16)
select name
from SalesPerson
where not(sales_id in (
select sales_id
from orders
where com_id = (select com_id from Company where name='RED')
));
'코딩테스트 풀이 > SQL' 카테고리의 다른 글
[LeetCode/Easy] 1407. Top Travellers (0) | 2023.03.19 |
---|---|
[LeetCode/Easy] 620. Not Boring Movies (0) | 2023.03.17 |
[LeetCode/Easy] 596. Classes More Than 5 Students (0) | 2023.03.16 |
[LeetCode/Easy] 595. Big Countries (0) | 2023.03.16 |
[LeetCode/Easy] 584. Find Customer Referee (0) | 2023.03.16 |