AlgoGymPreparationInterview Preparations
Cool NotesWindow functions in practice
All notes

Window functions in practice

SQL · Original AlgoGym revision note with a source for deeper study.

SQL
  1. A window function computes across related rows without collapsing them into one grouped row.
  2. PARTITION BY defines the group; ORDER BY defines sequence for ranking or running totals.
  3. ROW_NUMBER gives unique positions; RANK leaves gaps after ties; DENSE_RANK does not.
Read more at MySQL documentation