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

Paging events

There are exactly 666 unique events in the Summer Medals Olympics dataset. If you want to chunk them up to analyze them piece by piece, you'll need to split the events into groups of approximately equal size.

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

PostgreSQL Summary Stats and Window Functions

Kursa Göz Atın

Egzersiz talimatları

  • Split the distinct events into exactly 111 groups, ordered by event in alphabetical order.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

WITH Events AS (
  SELECT DISTINCT Event
  FROM Summer_Medals)
  
SELECT
  --- Split up the distinct events into 111 unique groups
  ___,
  ___ OVER (ORDER BY ___ ASC) AS Page
FROM Events
ORDER BY Event ASC;
Kodu Düzenle ve Çalıştır