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
- MySQL
- 피그마인디언
- tensorflow
- eda
- MS SQL Server
- 당신의 인생이 왜 힘들지 않아야 한다고 생각하십니까
- 딥러닝
- leetcode
- 프로그래머스
- HackerRank
- Labor Management System
- 코딩테스트연습
- TensorFlowGPU
- 데이터분석
- 웨어하우스 보관 최적화
- kaggle
- pandas profiling
- SQL
- ModelCheckPoint
- 파이썬
- ABC Analysis
- oracle
- Inventory Optimization
- forecast
- 신경쓰기의 기술
- Gaimification
- Product Demand
- ProfileReport
- SKU Consolidation
- 코딩테스트
Archives
- Today
- Total
오늘도 배운다
607. Sales Person / LeetCode, SQL, MySQL 본문
문제
source: LeetCode
Write an SQL query to report the names of all the salespersons who did not have any orders related to the company with the name "RED".
Return the result table in any order.

제출답안(MySQL)
WITH red_sp AS (
SELECT sales_id
FROM orders
WHERE com_id = (SELECT com_id FROM company WHERE name ='RED')
)
SELECT name
FROM salesperson
WHERE sales_id NOT IN (SELECT sales_id FROM red_sp)
문제 바로가기(MySQL)
728x90
'코딩테스트연습(SQL)' 카테고리의 다른 글
| 601. Human Traffic of Stadium / LeetCode, SQL, MS SQL (0) | 2023.03.18 |
|---|---|
| 262. Trips and Users / LeetCode, SQL, MySQL (0) | 2023.03.14 |
| 1527. Patients With a Condition / LeetCode, SQL, MySQL (0) | 2023.03.11 |
| 1393. Capital Gain/Loss / Leet Code, SQL, MySQL (0) | 2023.03.10 |
| 626. Exchange Seats / LeetCode, SQL, MySQL (0) | 2023.03.10 |
Comments