FUNCTION
= optional in Column A
FUNCTION is an optional parameter in the template. When all SQL queries are run towards the database, the default aggregate function used is SUM for each data column. To override the default function, the keyword FUNCTION can be added in column A and another aggregate function such as MAX, MIN, or AVG can be defined for any of the data columns. The FUNCTION parameter can also be used in combination with the CONDITION keyword in order to state a having condition.
Supported SQL aggregate functions:
- SUM = Returns the sum (default in Bizview).
- MAX = Returns the largest value.
- MIN = Returns the smallest value.
- AVG = Returns the average value.
- COUNT = Returns the number of rows.
The FUNCTION keyword only needs to be used in the template if any other aggregate function than SUM should be used in a column.
The FUNCTION row should be defined with ROWTYPE = DESIGN (the row will be hidden when document is generated).