Datalad tool
Window Function Playground
Window functions are the point where SQL stops being obvious. Change the parts below and watch the answer change on a real table, row by row. Click any row to see exactly which other rows it was allowed to look at, which is the thing that is almost impossible to picture from the syntax alone.
1
Build the window
The column it works on
Restart the calculation per group
The order inside each partition
2
The query
3
The answer, row by row
Click any row to highlight the frame it was calculated from.
the row you clicked
rows in its frame
partitions otherwise
[…] FunctionsArticleWindow playgroundCode […]
[…] row by row Click a row to see its window highlighted The query updates as you change the window Open the playground Free · runs in your browser · no […]
[…] BY, changed live ROWS against RANGE, answer shown row by row The query rewrites itself as you go Open the playground Free · runs in your browser · no […]