183. 从不订购的客户

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

先选出订购的顾客id,然后查询没在这批id的顾客
# Write your MySQL query statement below
select Name as Customers from Customers where Id not in (select distinct CustomerId from Orders);
本文标题:每日一题20201127*(183. 从不订购的客户)
本文链接:https://www.haomeiwen.com/subject/vwpswktx.html
网友评论