Nested SELECTs


  • 0
    J
    SELECT DISTINCT name AS name FROM salesperson
    WHERE sales_id NOT IN (
        SELECT DISTINCT(O.sales_id) FROM orders AS O 
        INNER JOIN company AS C ON O.com_id = C.com_id
        WHERE C.name = 'RED'
    )
    

Log in to reply
 

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