Red Glitter Pointer

 

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

 

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

 

 

느낀 점 및 정리 ✍️

1. 셀프 조인의 경우, 동일 테이블을 사용하는 것인 만큼 별칭을 잘 활용해야 헷갈리지 않게 작성할 수 있는 것 같다

 

 

+ Recent posts

loading