# 498ms
select c.Name as Customers from Customers c left join Orders o on o.CustomerId = c.Id where o.Id is null;

# 532ms
select c.Name as Customers from Customers c where not exists (select 1 from Orders o where o.CustomerId = c.Id);

# 455ms
select c.Name as Customers from Customers c where c.Id not in (select distinct o.CustomerId from Orders o);

183. 从不订购的客户

 

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-12-07
  • 2021-12-24
  • 2021-10-05
  • 2021-11-26
猜你喜欢
  • 2022-12-23
  • 2021-05-14
  • 2021-06-15
  • 2022-02-08
  • 2021-11-07
  • 2021-08-24
  • 2021-05-17
相关资源
相似解决方案