Reference Guide > TDV Support for SQL Functions > Aggregate Functions
 
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
BIT_AND
BIT_OR
BIT_XOR
CORR
CORR_SPEARMAN
COUNT
COVAR_POP
COVAR_SAMP
FIRST
GROUP CONCAT
GROUP CONCAT UNQUOTED
LAST
JSON ARRAYAGG
JSON OBJECTAGG
LISTAGG
MAX
MEDIAN
MIN
NEST
NTH
PERCENTILE
PERCENTILE_APPROX
PERCENTILE_CONT
PERCENTILE_DISC
QUANTILES
REGR_AVGX
REGR_AVGY
REGR_COUNT
REGR_INTERCEPT
REGR_R2
REGR_SLOPE
REGR_SXX
REGR_SXY
REGR_SYY
STDDEV
STDDEV_POP
STDDEV_SAMP
SUM
SUM_FLOAT
VARIANCE
VARIANCE_POP
VARIANCE_SAMP
XMLAGG