반응형
목록Symmetric Pairs (1)
반응형
오랑우탄의 반란
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/c4tliu/btsJ0NIcKhg/kFUD9GuOuEf5haUOJtoWm0/img.png)
오늘도 오랑이는 문제를 풉니다. Symmetric PairsYou are given a table, Functions, containing two columns: X and Y.Two pairs (X1, Y1) and (X2, Y2) are said to be symmetric pairs if X1 = Y2 and X2 = Y1.Write a query to output all such symmetric pairs in ascending order by the value of X. List the rows such that X1 ≤ Y1. Sample InputSample Output20 2020 2122 23 풀이과정x1 = y2 & x2 = y1 인 행이 2개 이상인 경우x 첫번째 풀이는 셀프조인..
SQL/HackerRank
2024. 10. 10. 10:44