SQL Foundations · Lesson 7 of 8 · 15 min

Window functions

Rankings, running totals and comparisons with the previous row, without losing any rows.

Aggregates squash rows into groups. Window functions calculate across related rows but keep every row. The magic word is OVER.

Ranking

← Previous: Subqueries and CTEs