Anyone have better idea not using subquery?


  • 0
    L
    select s.name from salesperson s
    where s.sales_id not in (
    select distinct o.sales_id 
    from orders o, company c
    where c.com_id = o.com_id
    and c.name ='RED')
    

    I firstly want to join salesperson to the subquery where c.name != 'RED'. but it turns out not working. Any one know why?

    All comments appreciate.


  • 0
    M

    @luckymyli same issue, don't know why


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.