Rising Temperature

表内自连接,TO_DAYS函数的使用
https://leetcode.com/problems/rising-temperature/

SELECT w1.Id FROM Weather w1 INNER JOIN Weather w2 ON TO_DAYS(w1.Date) = TO_DAYS(w2.Date) + 1 AND w1.Temperature > w2.Temperature

你可能感兴趣的:(Rising Temperature)