1. เรียนรู้
  2. /
  3. Courses
  4. /
  5. PostgreSQL Summary Stats and Window Functions

Connected

Exercises

Moving maximum of Scandinavian athletes' medals

Frames allow you to restrict the rows passed as input to your window function to a sliding window for you to define the start and finish.

Adding a frame to your window function allows you to calculate "moving" metrics, inputs of which slide from row to row.

คำแนะนำ

100 XP
  • Return the year, medals earned, and the maximum medals earned, comparing only the current year and the next year.