>_ IzzyLab

Topic breakdown

Window functions compute a value across a set of rows without collapsing them: unlike GROUP BY, where the original rows disappear, here every row is preserved but gets a computed characteristic. Ranking functions assign a row its position within an ordered set, and the OVER (...) construct describes the window — in what order to count. Keep in mind that when values tie, different ranking functions behave differently: some repeat the rank and skip ahead, others number consecutively. Sorting inside the window and the ORDER BY for output order are independent things.

What's checked

  1. ranks by descending amount are correct

What it looks like