AVERAGE

This function calculates an average value from an input stream.

For example, you can find the average income of a population.

See Also
Operators
Expression Language
Defining and Managing Data Queries
Parameter Description
filterExpression An Apollo expression to keep some elements only. It is useful to process the aggregation on a subpart of your input stream.
expression Extracts the numerical value of each element of the input stream. For example, person.income if your input is a stream of persons.

Default: identity function.

ignoreNulls By default the aggregation ignores null elements. If ignoreNulls: false the aggregation returns null if it finds at least one null.

Default: true.

convertToFloat By default the aggregation keeps the type of the numerical element. For example, if the income is an Integer, the numerical type is an Integer. If convertToFloat: true, the average aggregation returns a Float.

Default false.