I have a table with 2 fields (name, interest) and I want to find all pairs that have the same interest, with all duplicates and mirrored pairs removed.
I am able to find
I had similar problem and figure out studying the first answer that the query below will do the trick
SELECT P1.name AS name1,P2.name AS name2,P1.interest FROM Table AS P1,Table AS P2 WHERE P1.interest=P2.interest AND P1.name>P2.name