183. Customers Who Never Order

183. Customers Who Never Order_第1张图片
题目链接:

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)