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 Parameter(s)
all_distinct Returns true if all the input values are distinct (different).
  • Any value to test.

  • (optional) Any additional values to test.

all_same Returns true if all the input values are identical.
  • Any value to test.

  • (optional) Any additional values to test.

as_list Returns a list containing all the values passed in. The list may contain duplicates.
  • Any item to be added to the list.
  • (optional) Any additional items to add to the list.

avg Returns the average (mean) of the input values.
  • A numerical value.

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.

  • (optional) Any values to count.
count_distinct Counts the number of distinct groups of the specified value or values.
  • Any value to count.

  • (optional) Any additional values to count.

intersection Returns the intersection of the input geometries.
  • Any geometry.
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.

  • A numerical, boolean or string value.
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.

  • Any geometry.

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.

  • A numerical, boolean or string value.
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.

  • A numerical, boolean or string value.
union Returns the union of the input geometries.
  • Any geometry.