题目链接:
183. Customers Who Never Order
解析:
这道题比较简单,只需要综合两个表使用SELECT
查询语句即可,值的注意的是这是我们第一次使用NOT IN
关键字。
题解:
# Write your MySQL query statement below
SELECT Name AS Customers FROM Customers
WHERE Id NOT IN (SELECT CustomerId FROM Orders)
183. Customers Who Never Order
这道题比较简单,只需要综合两个表使用SELECT
查询语句即可,值的注意的是这是我们第一次使用NOT IN
关键字。
# Write your MySQL query statement below
SELECT Name AS Customers FROM Customers
WHERE Id NOT IN (SELECT CustomerId FROM Orders)