You are viewing a single comment's thread. Return to all comments →
MS SQL Server
WITH TBL AS( SELECT * FROM Functions WHERE x = y GROUP BY x, y HAVING COUNT(X) = 2 UNION SELECT TOP 50 PERCENT * FROM Functions F WHERE x <> y AND x IN (SELECT y FROM Functions WHERE x <> F.x) AND y IN (SELECT x FROM Functions WHERE y <> F.y) ) SELECT * FROM TBL 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 →
MS SQL Server