We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Select distinct a.x as w,a.y from functions a ,functions b
Where a.x =b.y and b.x = a.y and a.x < b.x
Union all
Select a1.x as w,a1.y from functions a1 where a1.x = a1.y group by a1.x,a1.y having count(*)>1
Order by w;
Nothing wrong with this
Cookie support is required to access HackerRank
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 →
Select distinct a.x as w,a.y from functions a ,functions b Where a.x =b.y and b.x = a.y and a.x < b.x Union all Select a1.x as w,a1.y from functions a1 where a1.x = a1.y group by a1.x,a1.y having count(*)>1 Order by w;
Nothing wrong with this