这个有点像是写离线查询了
# Write your MySQL query statement below
select sp.name from (
select sales_id, name from
SalesPerson
) sp left outer join (
select sales_id, com_id
from Orders
) o on (o.sales_id = sp.sales_id) left outer join (
select com_id, name
from Company
where name = 'RED'
) c on (o.com_id = c.com_id)
group by sp.name
having count(c.com_id) <= 0
标签:607,name,sp,sales,id,销售员,com,leetcode,select
From: https://www.cnblogs.com/wudanyang/p/17019916.html