每日一题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

原文地址:https://www.cnblogs.com/we8fans/p/14068998.html