You are viewing a single comment's thread. Return to all comments →
SQL Server
with pairs as( select f1.x, f1.y from functions f1 inner join functions f2 on f1.x = f2.y and f1.y = f2.x ), simp as( select x, y, count(*)cp from pairs group by x, y having count(*) > 1 ) select x, y from pairs where x < y union select x, y from simp order by x
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 →
SQL Server