Wieder was gelernt

PostgreSQL Window Functions

2020-12-18 (Friday)
Tags: postgres sql window functions

A window clause consists of three optional parts, a partition clause, an order clause and a frame clause. The partition clause is similar to a group by clause, except that it can only contain expressions, no output columns. Like the group by clause, it splits the output into parts which are processed independently. The order clause specifies how rows within each partition are ordered. The frame clause finally determines which rows are included in the window.