I have parent-child relation in my table (simplified version listed below):
| parent | child |
|--------+-------|
| p1 | c1 |
| p1 | c2 |
|--------+-------|
| p2 | c1 |
| p2 | c2 |
|--------+-------|
| p3 | c1 |
|--------+-------|
| p4 | c2 |
|--------+-------|
| p5 | c3 |
I need to query all parents with the exact same set of children like p1
and p2
.
Seems to be related to this question, but there are hard-coded children.