1. Học hỏi
  2. /
  3. Khoa Học
  4. /
  5. PostgreSQL Summary Stats and Window Functions

Connected

Bài tập

Future gold medalists

Fetching functions allow you to get values from different parts of the table into one row. If you have time-ordered data, you can "peek into the future" with the LEAD fetching function. This is especially useful if you want to compare a current value to a future value.

Hướng dẫn

100 XP
  • For each year, fetch the current gold medalist and the gold medalist 3 competitions ahead of the current row.