Aggregate Functions
Aggregate functions compare or combine values in a column and return a single result based on those values.
Certain restrictions apply to the use of aggregate functions with the DISTINCT clause. See DISTINCT in Aggregate Functions.
If any column in the SELECT clause is outside of an aggregate function, you must also include the column in the GROUP BY clause. See the example given for AVG.
TDV supports the aggregate functions listed in the table below.
|
TDV Supported Aggregate Function |
Comments |
|
ANY_VALUE |
|
|
APPROX COUNT DISTINCT |
|
|
APPROX QUANTILES |
|
|
ARRAG_AGG |
|
|
AVG |
AVG. |
|
BIT_AND |
|
|
BIT_OR |
|
|
BIT_XOR |
|
|
CORR. |
|
|
CORR_SPEARMAN |
|
|
COUNT |
|
|
FIRST |
|
|
GROUP CONCAT |
|
|
GROUP CONCAT UNQUOTED |
|
|
LAST |
|
|
JSON ARRAYAGG |
|
|
JSON OBJECTAGG |
|
|
MAX |
|
|
MIN |
MIN. |
|
NEST |
|
|
NTH |
|
|
QUANTILES |
|
|
SUM |
SUM. |
|
XMLAGG |