You are viewing a single comment's thread. Return to all comments →
WITH rns AS ( SELECT x, y, ROW_NUMBER() OVER(ORDER BY x) as rn FROM functions f ) SELECT DISTINCT f1.x, f1.y FROM rns f1 LEFT JOIN rns f2 ON f1.x = f2.y AND f1.y = f2.x AND f1.rn <> f2.rn WHERE f2.x IS NOT NULL AND f1.x <= f1.y ORDER BY f1.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 →