You are viewing a single comment's thread. Return to all comments →
with table1 as ( select *, row_number() over(order by X) as id from Functions ), table2 as( select distinct t1.x as x1, t1.y as y1, t2.x as x2, t2.y as y2 from table1 as t1 inner join table1 as t2 on t1.X=t2.Y and t1.Y=t2.X and t1.id!=t2.id) select x1 ,y1 from table2 where x1=y2 and x2=y1 and x1<=y1 order by x1
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 →