I do understand window functions and group by separately.
But what happens when you use both a window function and a group by clause in the same query ?
- Are the selected rows grouped first, then considered by the window function ?
- Or does the window function executes first, then the resulting values are grouped by
group by
? - Something else ?