Lets say, my tables has the following rows:
id | prop1 | prop2
______________________
1 foo a
2 bar a
3 foo b
4 bar b
5 foo c
Now in this case, i want to get rows grouped by prop1 but ignore the groups that don't contain a row with prop2=c
So the intended result is:
1 foo a
3 foo b
5 foo c
Note, now there is only one group in the example but i want to be able to get all of them. How can i achieve this approach?
prop1can have differentprop2's, which one you want to show?