본문 바로가기

IT/코딩테스트

[Leetcode] 197. Rising Temperature

728x90

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

SELECT today.id
FROM Weather AS today
  INNER JOIN Weather AS yesterday ON today.recordDate = DATE_ADD(yesterday.recordDate, INTERVAL 1 DAY)
WHERE today.temperature > yesterday.temperature;

 

728x90