https://leetcode.cn/problems/customers-who-never-order/
使用in
select Name Customers from Customers where
id not in (select CustomerId from Orders)
664 ms
加上disinct后速度快了很多
select Name Customers from Customers where
id not in (select distinct CustomerId from Orders)
273 ms
使用exists
select Name Customers from Customers c where
not exists (select distinct CustomerId from Orders o where o.CustomerId=c.Id)
271 ms
使用join
select c.Name Customers from Customers c
left join Orders o on o.CustomerId=c.Id
where o.CustomerId is null
555ms