Find MySQL entries with same set of column B values for their common column A value
- by nnsd44g
I have:
+----+------+------+
| id | A    | B    |
+----+------+------+
|  1 |    1 |    1 |  <
|  2 |    1 |    2 |  <
|  3 |    2 |    2 | 
|  4 |    2 |    3 | 
|  5 |    3 |    1 |  <
|  6 |    3 |    2 |  <
|  7 |    4 |    4 | 
|  8 |    4 |    5 | 
+----+------+------+
I need to select the entries that have the same set of B values for their common A value. So, in this case, I need ids 1, 2 and 5, 6 because in those cases the sequence of B values is 1, 2.
Is this possible?
Thanks!