每日一题20201127*(183. 从不订购的客户)

183. 从不订购的客户

image-20201201161904777

思路

先选出订购的顾客id,然后查询没在这批id的顾客
# Write your MySQL query statement below
select Name as Customers from Customers where Id not in (select distinct CustomerId from Orders);

image-20201201161817982

posted @ 2020-12-01 16:20  米洛丶  阅读(69)  评论(0)    收藏  举报