We have migrated to new Google sites!
Any aggregate function (used with the OVER clause) can also be used as a window function
cume_dist()
dense_rank()
first_value(expr)
lag(expr [,offset] [,default])
last_value(expr)
lead(expr [,offset] [,default])
ntile(expr)
percent_rank()
rank()
row_number()
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
Standard GROUP BY Example
ROLLUP
GROUPING SETS
CUBE
grouping(column [, ...]) function
group_id() function