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 | 
													Tags
													
											
												
												- 피그마인디언
 - 코딩테스트
 - Labor Management System
 - Inventory Optimization
 - TensorFlowGPU
 - leetcode
 - oracle
 - 딥러닝
 - HackerRank
 - 데이터분석
 - ProfileReport
 - MS SQL Server
 - pandas profiling
 - tensorflow
 - Product Demand
 - 파이썬
 - 코딩테스트연습
 - 당신의 인생이 왜 힘들지 않아야 한다고 생각하십니까
 - 웨어하우스 보관 최적화
 - eda
 - Gaimification
 - forecast
 - ModelCheckPoint
 - SKU Consolidation
 - 신경쓰기의 기술
 - 프로그래머스
 - SQL
 - ABC Analysis
 - MySQL
 - kaggle
 
													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