1. Learn
  2. /
  3. Courses
  4. /
  5. Time Series Analysis in PostgreSQL

Exercise

Ranking cold weather

You are working for the national weather agency for the US. Texas has been experiencing some unusually cold weather later and you have been tasked to analyze historical data and rank the coldest temperatures.

Rank the TX weather station data by t_monthly_min. Rank 1 should appear first and have the lowest temperature. Temperatures that are the same should have the same rank.

You will need to join temperatures_monthly and temperature_stations.

Instructions

100 XP
  • Rank t_monthly_min for the TX weather station by joining the two tables and partitioning by station_id; rank 1 should have the lowest temperature.