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.
/*I think this is a bit easier to understand for somebody who prefers joins over exists */selectt.x,t.yfrom(selecta.x,a.y-- , b.x as xi-- , b.y as yifromfunctionsainnerjoinfunctionsbona.x=b.yanda.y=b.xanda.x<a.yunionselectx,y-- , count(*)fromfunctionsawhere1=1andx=ygroupbyx,yhavingcount(*)>1)torderbyt.x,t.y;
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 →