Uniqueness Assumptions Are Weird
In this problem, we are lead to believe that there are unique id-name pairs (such as salesman id and salesman name or company name and company id). This is stan
In this problem, we are lead to believe that there are unique id-name pairs (such as salesman id and salesman name or company name and company id). This is standard practice in database normalization. Yet, in the solution, we have to explicitly assume that the com_id does not map uniquely to the company name. This is insanity!!

Observe the 'incorrect' solution:

```
SELECT 
    DISTINCT(name)
FROM salesperson s
WHERE s.sales_id NOT IN (
    SELECT 
        DISTINCT(o.sales_id) id
    FROM orders o 
    WHERE o.com_id = 1
)
```

And the 'correct' solution:
```
SELECT s.name
FROM salesperson s
WHERE s.sales_id NOT IN
(
	SELECT sales_id
	FROM 
		orders a
		LEFT JOIN 
		company b
		ON a.com_id = b.com_id
	WHERE b.name = 'RED'
)
```

Both solutions should be correct if the databases are properly normalized, and if they aren't, the wording of the question should be changed to reflect that.
[]