[LeetCode] Rising Temperature (interval, self join)
데이터 타입이 date라는 점을 주목하자 Select w1.id from weather w1 join weather w2 on w1.recorddate = date_add(w2.recorddate, interval +1 day) where w1.temperature > w2.temperature date_add() Add n days to a date and return the date select *로 출력해보면 {"headers": ["Id", "RecordDate", "Temperature", "Id", "RecordDate", "Temperature"], "values": [[2, "2015-01-02", 25, 1, "2015-01-01", 10], [3, "2015-01-03", 20, 2, ..
2021. 4. 9.