Partition by
You have been given monthly temperature data for various weather stations and are conducting an analysis on the minimum temperatures across the stations.
You're interested in grouping the data by the station_id and comparing the monthly minimum temperature with the minimum overall temperature of that station for the year 2010.
이 연습은 강의의 일부입니다
Time Series Analysis in PostgreSQL
연습 안내
- Use a window function to find the minimum
t_monthly_minthat is grouped bystation_id, filtered for the year 2010.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
-- Use a window function to find the minimum temperatures
SELECT
station_id,
year_month,
t_monthly_min,
___
FROM temperatures_monthly
WHERE ___;