- Categories:
SUM (system data metric function)¶
Returns the sum of the values for the specified column in a table. Use this function to detect unexpected changes in totals, such as during financial reconciliation.
This topic provides the syntax for calling the function directly. To learn how to associate the function with a table or view so it runs at regular intervals, see Associate a DMF.
Syntax¶
Arguments¶
querySpecifies a SQL query that projects a single column.
Allowed data types¶
The column projected by the query must have one of the following data types:
- FLOAT
- NUMBER
Returns¶
The function returns a NUMBER value for a NUMBER column and a FLOAT value for a FLOAT column. NULL values are ignored. The function returns NULL if the column contains no non-NULL values.
Example¶
Measure the sum of the amount column: