-
197. Rising Temperature mysqlLeetCode_Study_Plan/SQL 2022. 9. 30. 16:12
https://leetcode.com/problems/rising-temperature/?envType=study-plan&id=sql-i
lag, lead 이런거 찾아보고 있었는데 self join의 on으로 처리해서 풀 수 있었다..
어렵네..
select A.id as id from weather a inner join weather b on datediff(a.recordDate, b.recordDate) = 1 and a.temperature > b.temperature;
'LeetCode_Study_Plan > SQL' 카테고리의 다른 글
608. Tree Node mysql (0) 2022.10.02 607. Sales Person mysql (0) 2022.09.30 1148. Article Views I mysql (0) 2022.09.30 1581. Customer Who Visited but Did Not Make Any Transactions mysql (0) 2022.09.30 175. Combine Two Tables mysql (0) 2022.09.30