You are viewing a single comment's thread. Return to all comments →
Thanks a lot, I was stuck for more than an hour with symmetric pairs but was not able to filter out one set.This explanation does make it simpler.
with f1 as ( SELECT x, y,row_number()over(partition by x,y order by x) as cnt FROM Functions) SELECT DISTINCT f1.x,f1.y from f1 inner join Functions f2 on f1.x=f2.y and f1.y=f2.x and (f1.x!=f1.y or cnt >1) where 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 →
Thanks a lot, I was stuck for more than an hour with symmetric pairs but was not able to filter out one set.This explanation does make it simpler.