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

(1)
OLAP Aggregation function expressions

1  %Aggregation functions %OVER clause
for Aggregation functions
OLAP Aggregation functions

1 
2.1  %FIRST_VALUE function1
2.1  %LAST_VALUE
function2
2.1  %RATIO_TO_REPORT function3
2.1  %OLAP Window
Aggregate functions4
OVER clause for Aggregation functions

1  OVER5 (? %Window PARTITION clause5 ?  %Window
ORDER clause5? %Window Frame clause5 )

Usage

You can apply the OLAP aggregation functions to subsets of the rows in an OLAP window partition by specifying a window frame.