You are viewing a single comment's thread. Return to all comments →
SELECT f1.x, f1.y FROM functions f1 JOIN functions f2 ON f1.x = f2.y AND f2.x = f1.y WHERE f1.x < f1.y
UNION
SELECT x, y FROM functions GROUP BY x, y HAVING x = y AND COUNT(*) > 1
ORDER BY x, y;
Seems like cookies are disabled on this browser, please enable them to open this website
Symmetric Pairs
You are viewing a single comment's thread. Return to all comments →
SELECT f1.x, f1.y FROM functions f1 JOIN functions f2 ON f1.x = f2.y AND f2.x = f1.y WHERE f1.x < f1.y
UNION
SELECT x, y FROM functions GROUP BY x, y HAVING x = y AND COUNT(*) > 1
ORDER BY x, y;