Select Only if ID Value is X and no other value
How do I select the ID's that have only the colour "red" and not other colour:
| ID | Colour |
|---|---|
| 1 | Red |
| 3 | Blue |
| 2 | Red |
| 4 | Red |
| 1 | Yellow |
In am trying to write an SQL Where clause that gets me only ID's that have a value and no other value.
In this case I want a query that gives me only ID 4 & 2 because ID 1 has both Red and Yellow. I don't want to get number 1, just 4 & 2.