1. Learn
  2. /
  3. Courses
  4. /
  5. PostgreSQL Summary Stats and Window Functions

Exercise

Reigning champions by gender

You've already fetched the previous year's champion for one event. However, if you have multiple events, genders, or other metrics as columns, you'll need to split your table into partitions to avoid having a champion from one event or gender appear as the previous champion of another event or gender.

Instructions

100 XP
  • Return the previous champions of each year's event by gender.