👉https://leetcode.com/problems/customers-who-never-order/?envType=study-plan&id=sql-i
🤔 문제 분석
1) Write an SQL query to report all customers who never order anything.
💡 풀이
SELECT Customers.Name AS Customers
FROM Customers
LEFT JOIN Orders ON Customers.id = Orders.customerid
WHERE Orders.id is null
'코딩테스트 > 리트코드 SQL' 카테고리의 다른 글
[리트코드/SQL] 6. Swap Salary (627) (0) | 2022.12.05 |
---|---|
5. Calculate Special Bonus (1873) (0) | 2022.12.01 |
3. Find Customer Referee (584) (0) | 2022.12.01 |
2. Recyclable and Low Fat Products (1757) (0) | 2022.12.01 |
1. Big Countries (595) (0) | 2022.11.30 |
댓글