https://leetcode.com/problems/rising-temperature/description/
select w1.Id
from Weather as w1, Weather as w2
where TO_DAYS(w1.DATE) = TO_DAYS(w2.DATE) + 1
and W1.Temperature > W2.Temperature;
or,
select w1.Id
from Weather as w1, Weather as w2
where DATEDIFF(w1.DATE,w2.DATE) = 1
and W1.Temperature > W2.Temperature;
No comments:
Post a Comment