The original question is here.. MySQL self-referencing ID and selects
I would like to pose the question in a way with all the relation to a specific case removed.
I have the example table..
id1 id2
1 5
5 1
2 3
3 2
What SQL command would return..
id1 id2
1 5
2 3
Essentially removing the “duplicate rows”.
Q1 and Q2 are the alias’ I’ve created for your table, so we can reference the id’s as if they were on different tables.