You are viewing a single comment's thread. Return to all comments →
Great solution, also another thing that comes to mind is, us not having to use join for the second part. Basically:
f1.x = f2.y and f2.x = f1.y and (f1.x = f1.y) means (f1.x = f1.y) and instead of join we could use where in order to reduce the process load:
select f1.x, f1.y from functions f1 where f1.x = f1.y group by f1.x,f1.y having count(1) > 1
Symmetric Pairs
You are viewing a single comment's thread. Return to all comments →
Great solution, also another thing that comes to mind is, us not having to use join for the second part. Basically:
f1.x = f2.y and f2.x = f1.y and (f1.x = f1.y) means (f1.x = f1.y) and instead of join we could use where in order to reduce the process load:
select f1.x, f1.y from functions f1 where f1.x = f1.y group by f1.x,f1.y having count(1) > 1