👉 https://leetcode.com/problems/find-customer-referee/?envType=study-plan&id=sql-i
🤔 문제 분석
1) Write an SQL query to report the names of the customer that are not referred by the customer with id = 2.
💡 풀이
SELECT name
FROM Customer
WHERE referee_id <> 2 OR referee_id IS NULL
'코딩테스트 > 리트코드 SQL' 카테고리의 다른 글
[리트코드/SQL] 6. Swap Salary (627) (0) | 2022.12.05 |
---|---|
5. Calculate Special Bonus (1873) (0) | 2022.12.01 |
4. Customers Who Never Order (183) (0) | 2022.12.01 |
2. Recyclable and Low Fat Products (1757) (0) | 2022.12.01 |
1. Big Countries (595) (0) | 2022.11.30 |
댓글