You are viewing a single comment's thread. Return to all comments →
WITH functions_row_n AS( SELECT x, y, ROW_NUMBER() OVER(ORDER BY x, y) row_n FROM functions)
SELECT DISTINCT a.x, a.y FROM functions_row_n a, functions_row_n b WHERE a.row_n <> b.row_n AND a.x = b.y AND a.y = b.x AND a.x <= a.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 →
WITH functions_row_n AS( SELECT x, y, ROW_NUMBER() OVER(ORDER BY x, y) row_n FROM functions)
SELECT DISTINCT a.x, a.y FROM functions_row_n a, functions_row_n b WHERE a.row_n <> b.row_n AND a.x = b.y AND a.y = b.x AND a.x <= a.y;