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

Count the number of data per time series

You are a data scientist on a team evaluating weather time series data that another team has uploaded from an import file and you have been called upon to analyze the usefulness of this new dataset.

You have two tables that contain the data. Each time series is identified by a filename, station_id, and two character state code. You have been told that two of the stations have fewer data points than the other stations.

Write a query that indicates which two stations have the fewest data, sorted in ascending number of data points.

The tables temperature_stations and temperatures_monthly are available to you.

Bu egzersiz

Time Series Analysis in PostgreSQL

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Join the two tables and count the number of data per station, sorted in ascending order.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Count the number of data per station, sorted in ascending order
SELECT filename, state, ___ AS count
FROM temperatures_monthly
JOIN ___ USING(___)
GROUP BY filename, state
___;
Kodu Düzenle ve Çalıştır