Aggregate Functions
Aggregate functions operate on multiple sets of values and return a single value.
AVG( <expr> )
select avg(colA) from table1;COUNT( <expr> )
select count(colA) from table1;
select count(*), colA from table1 group by colA;DISTINCT( <expr> )
select distinct(colA) from table1;select max(colA) from table1;MIN( <expr> )
select min(colA) from table1;SUM( <expr> )
ARBITRARY / ANY_VALUE( <expr> )
LISTAGG( [distinct] <column> [, <delimiter>]) [within group (order by <column> ) )
STRING_AGG( [distinct] <column> [, <delimiter>]) order by <column> limit <value> )
COUNT(DISTINCT( <expr> ))
Last updated
