Apologies if this exists in another question but I'm unable to locate it. Say I have a table
ID Type
1 A
1 A
4 A
1 A
1 A
2 A
2 B
3 A
3 A
3 B
4 A
1 A
4 A
I want to select the ids that only have entry 'A' in the Type column for all their row entries. Expected output should be:
ID
1
4
I attempted to do this
select id
from table
order by id
having Type = 'A'
but not getting expected result.