0703 til

looggi·2023년 7월 2일
0

TILs

목록 보기
108/114
post-thumbnail

197. Rising Temperature

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

select w.id
from weather w, weather ww
where datediff(w.recordDate ,ww.recordDate )=1 and w.temperature > ww.temperature

join 쓰면 틀림 왜썼지..

select w.id
from weather w, weather ww
where subdate(w.recorddate,1)=ww.recorddate and w.temperature > ww.temperature

subdate(날짜, 숫자) 로 하는 게 더 빠름

profile
looooggi

0개의 댓글