LoslegenKostenlos loslegen

Aggregating temperature data

As a data scientist on a research project studying climate cycles you are analyzing how much the monthly high and low temperatures vary over time.

You are interested in the difference between the maximum-minimum monthly temperature and the minimum-minimum monthly temperature, and in the metric for the monthly max temperatures. You call these min_spread and max_spread respectively:

  1. min_spread : maximum minimum monthly temperature - the minimum minimum monthly temperature
  2. max_spread : maximum maximum monthly temperature - the minimum maximum monthly temperature

You will first aggregate these two metrics on an overall basis. Then, you will aggregate by location and look at the variation by season.

temperature_stations and temperatures_monthly are available to you.

Diese Übung ist Teil des Kurses

Time Series Analysis in PostgreSQL

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

-- Calculate the overall min_spread and max_spread
SELECT
    ___ AS min_spread,
    ___ AS max_spread
FROM ___;
Code bearbeiten und ausführen