OLAP aggregation function expressions
OLAP aggregation function expressions can return aggregate information about rows in the partitioned results of a query.
OLAP aggregation function expressions are OLAP window expressions that you can include in the Projection list of a SELECT statement, or the ORDER BY clause of a SELECT statement.
Syntax
(explicit id oafl001)
oafl001
(explicit id orfl002)
orfl002
(explicit id orfl003)
orfl003
(explicit id orfl005)
orfl005
(explicit id oafl004)
oafl004
OLAP Aggregation function expressions
<Aggregation functions> <OVER clause for Aggregation functions>
OLAP Aggregation functions
{ <FIRST_VALUE function> [] | <LAST_VALUE function>[] | <RATIO_TO_REPORT function>[] | <OLAP Window Aggregate functions>[] }
OVER clause for Aggregation functions
OVER[]( <Window PARTITION clause> []
[ <Window ORDER clause>[] <Window Frame clause>[] ] )
Usage
You can apply the OLAP aggregation functions to subsets of the rows in an OLAP window partition by specifying a window frame.
3 See LAST_VALUE function