[코드카타] SQL 24 Rising Temperature

Data_Student·2024년 11월 8일
0

코드카타

목록 보기
31/57

[코드카타] SQL 24 Rising Temperature

24. Rising Temperature
https://leetcode.com/problems/rising-temperature/

Write a solution to find all dates' id with higher temperatures compared to its previous dates (yesterday).
Return the result table in any order.
SELECT w2.id
FROM Weather w1
join Weather w2
ON DATEDIFF (w2.recordDate ,w1.recordDate ) = 1
AND w2.temperature>w1.temperature
같은 테이블을 두번 조인 후 어제와 비교

0개의 댓글