Windowing analytical
Definition
An analytic function computes values over a group of rows and returns a single result for each row. This is different from an aggregate function, which returns a single result for a group of rows.
Parameters
-
Partition by (+add):
- Def: Specify the column for grouping.
-
Order by (+add):
- Def: Specify the column for ordering.
-
Function:
- Def: Specify the function to use.
-
On column:
- Def: Specify the column to use for function.
-
N:
- Def: Specify the size of rows.
-
Column output:
- Def: Specify the name of the column.
Additionnal Comments
Functions:
-
cume_dist:
- Def: Returns cumulative distribution of a value within a group of values; that is, the percentage of partition values less than or equal to the value in the current row.
-
lag:
- Def: Returns the value of the umpteenth row before the current row.
-
lead:
- Def: Returns the value of the umpteenth row after the current row.