Collection Contents Previous Next PDF

ASA SQL User's Guide

Using OLAP

Working with OLAP functions


OLAP functions provide the capability to perform analytic tasks on data, such as computing moving averages, ranks, and cumulative values. You can include an OLAP function in a select-list or on the ORDER BY clause of a SELECT statement. An OLAP function cannot be used as an argument of an aggregate function. Therefore, you cannot have functions like SUM( RANK() ).

When using an OLAP function, a window is specified that defines the rows over which the function is applied, and in what order. The set of rows is defined, relative to the current row, as either a range or a number of rows preceding and following. For example, you can calculate an average over the previous three month period.

The following OLAP functions are available:


Rank functions
Reporting functions
Window functions

Collection Contents Previous Next PDF