LeetCode - 183. Customers Who Never Order (MySQL)

조민수·2024년 6월 3일
0

LeetCode

목록 보기
6/61

Easy, SQL - Nested Query

RunTime : 869 ms


문제

Write a solution to find all customers who never order anything.

Return the result table in any order.

The result format is in the following example.


풀이

  • 간단한 문제
  • JOIN을 사용하는 것이 아닌 문제였다.
SELECT name AS Customers FROM Customers
WHERE id NOT IN
(
    SELECT customerId FROM Orders
)
profile
사람을 좋아하는 Front-End 개발자

0개의 댓글