August 2002
Intermediate to advanced
528 pages
10h 12m
English
Oracle has added to its database some functionality that allows you to calculate values based on a window. The window is a period of time. The functions in this class can be used to compute moving, cumulative, and centered aggregates. They include moving averages, moving sums, moving MIN/MAX, cumulative SUM, and LAG/LEAD. These functions create a value that is based on values that precede or follow the record. The windowing functions can be used in the SELECT and ORDER BY clauses.
The following is a syntax template that can be used for the functions:
{Sum|Avg|Max|Min|Count|Stddev|Variance| First_value|Last_value} ({value expression1> | * }) Over ({partition by <value expression2>[, …]] Order by <value expression3>[collate clause>] ...