4 solutions (EXCEPT/MINUS, NOT IN, NOT EXISTS, RIGHT JOIN)
Code
# Code
```
-- First solution: EXCEPT/ MINUS
select SP.name from SalesPerson SP
except
select SP.name from Orders O join SalesPerson SP on O.sales_id = SP.sales_id 
join Company C on (O.com_id = C.com_id and C.name = 'RED')
```

```
-- Second solution: NOT IN
select name from SalesPerson where sales_id not in 
(select sales_id from 
Orders O join Company C on O.com_id = C.com_id where name = 'RED')
```

```
-- Third solution: NOT EXISTS
select name from SalesPerson SP where not exists 
(select 1 from Orders O join Company C on O.com_id = C.com_id 
where name = 'RED' and SP.sales_id = O.sales_id)
```

```
-- Fourth solution: RIGHT JOIN
select SP.name from Orders O 
join Company C on (O.com_id = C.com_id and C.name = 'RED')
right join SalesPerson SP on SP.sales_id = O.sales_id
where O.sales_id is null
```
['MySQL', 'Oracle', 'MS SQL Server']