Problem 197

Rising Temperature

Posted by Ruizhi Ma on July 3, 2019

问题描述

https://leetcode.com/problems/rising-temperature/

代码

# Write your MySQL query statement below
SELECT tb1.Id
FROM Weather as tb1
INNER JOIN Weather as tb2
ON tb1.Temperature > tb2.Temperature AND DATEDIFF(tb1.RecordDate, tb2.RecordDate) = 1
WHERE tb1.RecordDate > tb2.RecordDate;