티스토리 뷰
https://leetcode.com/problems/rising-temperature
LeetCode - The World's Leading Online Programming Learning Platform
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
with base as (
select
id, recordDate, temperature
, lag(recordDate, 1) over (order by recordDate) last_d
, lag(temperature, 1) over (order by recordDate) last_t
from weather
)
select
distinct id
from base
where datediff(recordDate, last_d) = 1 and last_t < temperature
'프로그래밍연습 > SQL' 카테고리의 다른 글
[SQL]weather-observation-station-5 (0) | 2023.08.25 |
---|---|
[SQL]confirmation-rate (0) | 2023.08.22 |
[SQL]exchange-seats (0) | 2023.08.21 |
[SQL]friend-requests-ii-who-has-the-most-friends (0) | 2023.08.20 |
[SQL]game-play-analysis-iv (0) | 2023.08.19 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 사분위수
- 확률
- 조건부확률
- 파이썬
- 분산
- random forest
- 상관관계
- 상대도수
- 뇌하수체
- 뇌하수체선종
- neural network
- 군고구마
- 평균
- 힙
- Lambda
- 통계
- hash
- Python
- counter
- 코딩테스트
- TensorFlow
- programmers
- 확률분포
- 분당서울대병원
- 프로그래머스
- leatcode
- SQL
- 쿠싱
- 쿠싱증후군
- 중앙값
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함