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.
- Prepare
- SQL
- Advanced Join
- Symmetric Pairs
- Discussions
Symmetric Pairs
Symmetric Pairs
Sort by
recency
|
1534 Discussions
|
Please Login in order to post a comment
can anyone tell me what is wrong with this: with cte as (select a.X as X, a.Y as Y, b.X as X_new, b.Y as Y_new from functions as a join functions as b on a.Y = b.X) select distinct X, Y from cte where X = Y_new and X <= Y order by X
what is the error in this : select distinct t1.X,t1.Y from functions t1 cross join functions t2
where t1.X=t2.Y and t1.Y=t2.X and t1.X<=t1.Y order by t1.X
**Check out this video for 10 Solved SQL Hackerrank Solutions - https://www.youtube.com/watch?v=sUMUDJUWDZI **
MySQL