GitHubContribute in GitHub: Edit online

Aggregation function types at a glance

An aggregation function performs a calculation on a set of values, and returns a single value. This article lists all available aggregation functions grouped by type.

Binary functions

Function Description
binary_all_and() Returns aggregated value using the binary AND of the group.
binary_all_or() Returns aggregated value using the binary OR of the group.
binary_all_xor() Returns aggregated value using the binary XOR of the group.

Dynamic functions

Function Description
make_list(), make_list_if() Returns a list of all the values within the group without/with a predicate.
make_list_with_nulls() Returns a list of all the values within the group, including null values.
make_set(), make_set_if() Returns a set of distinct values within the group without/with a predicate.

Row selector functions

Function Description
arg_max() Returns one or more expressions when the argument is maximized.
arg_min() Returns one or more expressions when the argument is minimized.

Statistical functions

Function Description
avg() Returns an average value across the group.
avgif() Returns an average value across the group (with predicate).
count(), countif() Returns a count of the group without/with a predicate.
dcount(), dcountif() Returns an approximate distinct count of the group elements without/with a predicate.
max(), maxif() Returns the maximum value across the group without/with a predicate.
min(), minif() Returns the minimum value across the group without/with a predicate.
sum(), sumif() Returns the sum of the elements within the group without/with a predicate.