Aggregate Function
An aggregate function performs a calculation operation on a set of input values and returns a value. For example, the COUNT function counts the number of rows retrieved by an SQL statement. Table 1 lists aggregate functions.
| Function | Return Data Type | Description |
|---|---|---|
| COUNT(value [, value]* ) | DOUBLE | Return count of values that are not null. |
| COUNT(*) | BIGINT | Return count of tuples. |
| AVG(numeric) | DOUBLE | Return average (arithmetic mean) of all input values. |
| SUM(numeric) | DOUBLE | Return the sum of all input numerical values. |
| MAX(value) | DOUBLE | Return the maximum value of all input values. |
| MIN(value) | DOUBLE | Return the minimum value of all input values. |
| STDDEV_POP(value) | DOUBLE | Return the population standard deviation of all numeric fields of all input values. |
| STDDEV_SAMP(value) | DOUBLE | Return the sample standard deviation of all numeric fields of all input values. |
| VAR_POP(value) | DOUBLE | Return the population variance (square of population standard deviation) of numeral fields of all input values. |
| VAR_SAMP(value) | DOUBLE | Return the sample variance (square of the sample standard deviation) of numeric fields of all input values. |
Precautions
None
Example
None
Last Article: Type Conversion Function
Next Article: Table-Valued Functions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.