-3

I have an dataset like this where A,B are one set and C,D,E are another set.

enter image description here

I want to Filter out data where all the entries are Yes.For e.g. Only C,D,E should be returned not B.

1 Answers1

1

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');
Yogesh Sharma
  • 49,870
  • 5
  • 26
  • 52