BaşlayınÜcretsiz başlayın

Multi running average

The team leader was very impressed with your work getting the running average for Hawaii. They have now decided they need the running average of lowest monthly temperatures across all stations. Luckily, you know how to do to this quickly.

Bu egzersiz, kursun bir parçasıdır

Time Series Analysis in PostgreSQL

Kursa Göz Atın

Egzersiz talimatları

  • Use a window function to find the running average for t_monthly_min across various time series.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

-- Calculate the running average of the lowest temperates for all stations
SELECT
	ts.state,
	year_month,
	t_monthly_min,
    ___ AS running_avg_temp
FROM temperatures_monthly AS tm
JOIN temperature_stations AS ts 
	USING(station_id)
ORDER BY ts.state, year_month;
Kodu Düzenle ve Çalıştır