Group or Aggregate Operators
In this section, we'll introduce the following concepts:
![icon](/img/icons/operations/queries.png)
avg
Calculates the avg value of a numerical field being evaluated.
![icon](/img/icons/operations/queries.png)
count, count_distinct, count_frequent
Use with a group operator and field name.
![icon](/img/icons/operations/queries.png)
first, last
Return the first or last result relative to the sort order.
![icon](/img/icons/operations/queries.png)
median
Calculates the median value for a particular field.
![icon](/img/icons/operations/queries.png)
min, max
Use these functions to find the smallest or largest value in a set of values.
![icon](/img/icons/operations/queries.png)
most_recent, least_recent
Select the most or least recent value within a group.
![icon](/img/icons/operations/queries.png)
pct
Finds the specified percentiles of a given field.
![icon](/img/icons/operations/queries.png)
pct_sampling
Finds the percentile of a given field.
![icon](/img/icons/operations/queries.png)
stddev
Finds the standard deviation for numerical values within a time range.
![icon](/img/icons/operations/queries.png)
sum
Adds values of a numerical field being evaluated within a time range.
![icon](/img/icons/operations/queries.png)
values
Provides all the distinct values of a field.