Main
Introduction
Types
SQL windows functions
https://learnsql.com/blog/sql-window-functions-cheat-sheet/Window_Functions_Cheat_Sheet.pdf
> Windows functions perform a calculation across a set of table rows that are somehow related to the current row (
sliding window frame
).
>
Syntax
Mock hospital dataset
Example/1: average number of patients per department/month?
Example/2: Compare with GROUP BY aggregate functions:
> Windows functions do
not
collapse input rows into a single output row (compare with aggregate functions).