Snoopy 4. Customers Who Never Order (183)
코딩테스트/리트코드 SQL

4. Customers Who Never Order (183)

Sooyoon Jeong 2022. 12. 1.

👉https://leetcode.com/problems/customers-who-never-order/?envType=study-plan&id=sql-i

 

Customers Who Never Order - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com


🤔 문제 분석

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

댓글