I have an dataset like this where A,B are one set and C,D,E are another set.
I want to Filter out data where all the entries are Yes.For e.g. Only C,D,E should be returned not B.
I have an dataset like this where A,B are one set and C,D,E are another set.
I want to Filter out data where all the entries are Yes.For e.g. Only C,D,E should be returned not B.
If you want filter then you can use NOT EXISTS
:
select t.*
from table t
where not exists (select 1 from table t1 where t1.id = t.id and t1.status = 'no');