题目链接:197. 上升的温度
Ideas
思路:用
datediff
将今天的记录和昨天的记录拼接起来,然后加一个and
条件筛选。
Code
MySQL
select w1.id from weather as w1 join weather as w2 on datediff(w1.recordDate, w2.recordDate) = 1 and w1.Temperature > w2.Temperature;
题目链接:197. 上升的温度
思路:用
datediff
将今天的记录和昨天的记录拼接起来,然后加一个and
条件筛选。
select w1.id from weather as w1 join weather as w2 on datediff(w1.recordDate, w2.recordDate) = 1 and w1.Temperature > w2.Temperature;