목록날짜연산 (2)
개발은 처음이라 개발새발

https://www.hackerrank.com/challenges/symmetric-pairs/problem?h_r=internal-search Symmetric Pairs | HackerRank Write a query to output all symmetric pairs in ascending order by the value of X. www.hackerrank.com 문제를 살펴보면 두가지 경우의 해당하는 x,y를 찾아야 합니다. 첫번째는 x와 y가 같은 로우가 2개이상일 때, 두번째는 x와 y가 교차로 다른 로우와 같을 때 y가 큰 쪽을 찾아야 합니다. 이렇게 서로 다른 조건을 가로로 붙이지 않고 세로로 붙일 때 UNION 함수를 사용합니다. 그렇다면 첫번째 조건부터 쿼리를 작성해보겠습니다. ..
https://leetcode.com/problems/rising-temperature/ Rising Temperature - LeetCode Can you solve this real interview question? Rising Temperature - Table: Weather +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | recordDate | date | | temperature | int | +---------------+---------+ id is the pr leetcode.com 이번 퀴즈는 Self Join뿐만 아니라 DATE_ADD()함수까지 곁들인 퀴즈입니다...