Given the table
seq_id | seq_status |
---|---|
1 | A |
1 | B |
2 | A |
2 | A |
3 | A |
4 | B |
5 | C |
I want to select the distinct seq_id's where the seq_status is A (2 and 3) and not return if one of the values is different
so far I have something that looks like this
SELECT distinct(s.seq_id) FROM sequence s
having s.seq_id IN (
select z.seq_id
from sequence z
group by z.seq_id, z.seq_status
having z.seq_status = "A" )
But that returns any seq_id with seq_status A and I'm looking for only seq_id where the seq_status all match the required value