You are here: Basic Steps > 4. Rules > Rule Components > Aggregate Functions

Aggregate Functions

Aggregate functions calculate a single result from one or more input values, specified as the result of a sub-condition.

The following Aggregate functions can be used within 1Integrate.

Function Description
all_distinct Returns true if all the input values are distinct (different).
all_same Returns true if all the input values are identical.
avg Returns the average (mean) of the input values.
count

Counts the number of objects or the number of non-null parameter values.

If no parameters are passed, this function counts the number of objects traversed. Otherwise it counts the number of objects for which any of the parameters has a non-null value.

count_distinct Counts the number of distinct groups of the specified value or values.
intersection Returns the intersection of the input geometries.
max

Returns the maximum value of the parameter over each object traversed.

The values may be either numerical values, booleans or strings.

Boolean values are regarded as being equal to either 1 for true or 0 for false.

Strings are compared lexicographically. If numbers are compared to strings, they are converted to strings before being compared.

mbr

Returns the MBR (minimum bounding rectangle) of a set of geometries.

The final result is the smallest rectangle, with sides parallel to the X and Y axes, containing all the geometry values passed in.

min

Returns the minimum value of the parameter over each object traversed.

The values may be either numerical values, booleans or strings.

Boolean values are regarded as being equal to either 1 for true or 0 for false.

Strings are compared lexicographically. If numbers are compared to strings, they are converted to strings before being compared.

sum

Returns the sum of the parameter value over each object traversed.

The values may be either numerical values, booleans or strings.

Boolean values are regarded as being equal to either 1 for true or 0 for false.

Strings are added together using concatenation. If numbers are added to strings, they are converted to strings first.

union Returns the union of the input geometries.