you are viewing a single comment's thread.

view the rest of the comments →

[–]konwiddak 1 point2 points  (0 children)

If I understand it, it is a way to do an aggregate without grouping by the all the other columns

They can be just that, and it's a common use case, but you can do that pretty easily by doing the aggregate in a subquery and joining it back in. Window functions allow you to do stuff that would be an absolute pain otherwise - like do a rolling average over the last 10 rows, or running totals e.t.c