Skip to main content

Aggregation functions

The same set of aggregation functions is used across the whole platform in different context ("Aggregate Rows" dialog, transformations, markup)

Common

FunctionDescription
firstfirst (any) value
counttotal number of all values (including missing)
#valuesnumber of non-missing values
#uniquenumber of unique values
#nullsnumber of missing values

Numerical

FunctionDescription
min
max
sum
med
avg
stdev
variance
skewskewness
kurtkurtosis
q1first quartile, the median of the lower half
q2second quartile, same as med
q3third quartile, the median of the upper half

Textual

FunctionDescription
min
max
sum
med
avg
stdev
variance
skewskewness
kurtkurtosis
q1first quartile, the median of the lower half
q2second quartile, same as med
q3third quartile, the median of the upper half

User-defined functions

Datagrok API provides a way to register custom aggregation functions; once registered, they will automatically appear in UI across the whole platform.

Markup syntax for referring to aggregations: t.stats.avg(AGE)

See also: