728x90 SUB_QUERY2 Leetcode) No.626 [Exchange Seats] Leetcode) No.626 [Exchange Seats] 문제 Exchange Seats - LeetCode Exchange Seats - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 설명 #UNION #SUB_QUERY #ORDER 이와 같이 id가 가리키는 student가 변경되어야 한다. 홀수 id 를 만드는 Sub query 와 짝수 id 를 만드는 Sub query 를 하나씩 작성하여 UNION 을 한 뒤, UNION 이 된 table 을 id 를.. 2021. 9. 4. Leetcode) No.180 [Consecutive Numbers] Leetcode No.180 [Consecutive Numbers] 문제 Consecutive Numbers - LeetCode Consecutive Numbers - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 설명 Id 는 각각 순차적으로 나열이 되어 있으면서 저렇게 세 집합의 교집합으로 같은 Num을 가지는 숫자를 탐색해서 풀어보았다. 그리고 같은 번호가 여러번 확인이 될 수 있고, 그 결과 여러번 출력될 수 있으므로 DISTINCT 를 통해 한 번호가 .. 2021. 9. 3. 이전 1 다음 728x90