EASY | Two ways to solve | left join | MySql
\n approach - \n  Get the sales_id from orders table which has company name as RED using left join orders and customer table.\n  now select the name from salesp
\n approach - \n*  Get the sales_id from orders table which has company name as RED using left join orders and customer table.\n*  now select the name from salesperson table that is not in the above sales_id.\n** 1st approach**\nusing subquery :\n```\n\nselect name from salesperson\nwhere sales_id not in (select sales_id\nfrom orders o\nleft join company c\non o.com_id = c.com_id\nwhere c.name LIKE \'RED\')\n\n```\n**2nd Approach using cte** --- FASTER\n```\nwith cte as (\nselect sales_id\nfrom orders o\nleft join company c\non o.com_id = c.com_id\nwhere c.name LIKE \'RED\' )\n\nselect name from salesperson\nwhere sales_id not in (select sales_id from cte)\n```
['MySQL']