SQL: Window Functions

Wishlist Share

About Course

Answer questions like “what is each person’s rank in their team?”, “what is the running total?” and “how does this month compare with last month?” in a single SQL query. This course explains window functions, OVER, PARTITION BY and ORDER BY, ranking functions, running totals and moving averages, and LAG and LEAD.

Tutwoo is an independent learning provider. This course is general skills training based on official documentation. It is not an accredited qualification. Software behaviour can change between versions, so check the official documentation for the version you use.

What Will You Learn?

  • Explain how window functions differ from GROUP BY aggregates Use OVER with PARTITION BY and ORDER BY Rank rows with ROW_NUMBER, RANK and DENSE_RANK Calculate running totals, moving averages and period-on-period changes

Course Content

Course Lessons

  • What window functions do
  • Ranking rows
  • Running totals and moving averages
  • LAG, LEAD and practical tips

Sources & Further Reading
The official guidance this course is based on.

Final Assessment

Student Ratings & Reviews

No Review Yet
No Review Yet

Want to receive push notifications for all major on-site activities?

✕