Greenplum built-in windows functions

Any aggregate function (used with the OVER clause) can also be used as a window function

sachi=# select x, row_number() over() from generate_series(1, 15, 2) as t(x);

 x  | row_number 

----+------------

  1 |          1

  3 |          2

  5 |          3

  7 |          4

  9 |          5

 11 |          6

 13 |          7

 15 |          8

(8 rows)

On-Line Analytic Processing: The purpose of OLAP is to quickly provide answers to multi-dimensional queries.

“Window” Functions: Allow access to multiple rows in a single table scan.

OLAP Grouping Extensions: Similar to GROUP BY but much more flexible. For example