183. Customers Who Never Order(SQL)
# Easy
# Write your MySQL query statement below
# is NULL的语法
select Name Customers from Customers
left join Orders on Customers.Id = Orders.CustomerId
where Orders.CustomerId is NULL;
# not in 语法
select Name Customers from Customers
where Id not in (select CustomerId from Orders);
不好做
is NULL 和 not in 语法很懵圈。
Last updated
Was this helpful?