Aggregation Functions |
Table: Aggregation Functions lists the OLAP DML aggregation functions. The OLAP DML also provides an aggmap object that you can use to aggregate data, see "Aggregation Statements" for a list of related OLAP DML statements.
Aggregation Functions
| Statements | Description |
|---|---|
| ANY
|
Returns YES when any values of a Boolean expression are TRUE, or NO when none of the values are TRUE. |
| AVERAGE
|
Calculates the average of the values of an expression. |
| COUNT
|
Retrieves the number of TRUE values of a Boolean expression, or 0 (zero) if no values of the expression are TRUE. |
| EVERY
|
Returns YES when every value of a Boolean expression is TRUE, or NO if any value of the expression is FALSE. |
| LARGEST
|
Returns the largest value of an expression. You can use this function to compare numeric values or date values. |
| MEDIAN
|
Calculates the median of the values of an expression. |
| MODE
|
Returns the mode (the most frequently occurring value) of a numeric expression; or NA when there are no duplicate values in the data. |
| NONE
|
Returns YES when no values of a Boolean expression are TRUE; or NO when any value of the expression is true. |
| PERCENTAGE
|
Computes the percent of total for each value in a numeric expression. |
| SMALLEST
|
Returns the smallest value of an expression. You can use this function to compare numeric values or date values. |
| TCONVERT
|
Converts data from one dimension of type DAY, WEEK, MONTH, QUARTER, or YEAR to another dimension of type DAY, WEEK, MONTH, QUARTER, or YEAR. You can specify an aggregation method or an allocation method to use in the conversion. |
| TOTAL
|
Calculates the total of the values of an expression. |