Aggregate Functions (Azure Stream Analytics)

Aggregate functions perform a calculation on a set of values and return a single value. Except for the COUNT function, aggregate functions ignore null values. Aggregate functions are frequently used with the GROUP BY clause of the SELECT statement.

All aggregate functions are deterministic. This means aggregate functions return the same value any time that they are called by using a specific set of input values.

Aggregate functions can be used as expressions only in the following:

  • The select list of a SELECT statement (either a subquery or an outer query).

  • A HAVING clause.

Stream Analytics Query Language provides the following aggregate functions:

Aggregate functions ... ...
AVG (Azure Stream Analytics) COUNT (Azure Stream Analytics) Collect (Azure Stream Analytics)
CollectTOP (Azure Stream Analytics) MAX (Azure Stream Analytics) MIN (Azure Stream Analytics)
Percentile_Cont (Azure Stream Analytics) Percentile_Disc (Azure Stream Analytics) STDEV (Azure Stream Analytics)
STDEVP (Azure Stream Analytics) SUM (Azure Stream Analytics) TopOne (Azure Stream Analytics)
VAR (Azure Stream Analytics) VARP (Azure Stream Analytics)

See Also

Built-In Functions
Analytic Functions
Array Functions
Conversion Functions
Date and Time Functions
Mathematical Functions
Record Functions
String Functions