# Aggregation Operators

Aggregation operators help aggregate log messages into groups.

FuseQL applies aggregations **_after_** applying the filters specified in the log search bar, and in the time range selected in the time picker. FuseQL groups all aggregations by time buckets, unless the user specifies additional grouping using the  dropdown.

Kloudfuse automatically selects the [count](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#count) and [count_unique](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#count-unique) operators by default, depending on the data type of the variable. For other operators, click the drop-down next to the  (Show) label, and select the aggregation operator.

FuseQL supports these aggregator types:

## Counting operators

[count](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#count) and [count_unique](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#count-unique)

## Statistical operators

[min](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#min), [max](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#max), [avg](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#avg), [sum](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#sum), [stddev](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#stddev), [stdvar](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#stdvar), and [percentiles](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#percentiles)

## Ordered aggregation operators

[first](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#first) and [last](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#last)

Here is the comprehensive list of aggregation operators:

- [avg](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#avg): Computes the average of numeric values.

- [count](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#count): Counts the total number of log lines.

- [count_unique](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#count-unique): Counts only unique or distinct occurrences of the field.

- [first](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#first): Computes the first of numeric values.

- [last](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#last): Computes the last of numeric values.

- [max](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#max): Computes the maximum of numeric values.

- [min](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#min): Computes the minimum of numeric values.

- [percentiles](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#percentiles): Computes the percentiles (p50, p75, p90, p95 or p99) of numeric values.

- [stddev](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#stddev): Computes the standard deviation of numeric or duration-valued facets.

- [stdvar](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#stdvar): Computes the standard variance of numeric or duration-valued facets.

- [sum](https://docs.kloudfuse.com/platform/3.3.6/fuseql-aggregation-operators/#sum): Computes the sum of numeric or duration-valued facets.

## avg

Computes the average of numeric values.

## count

Counts the total number of log lines.

## count_unique

Counts only unique or distinct occurrences of the field.

This operator can be applied on fingerprints, labels or string valued facets (facet value can be of string/UUID/IP address datatype).

## first

Computes the first of numeric values.

## last

Computes the last of numeric values.

## max

Computes the maximum of numeric values.

## min

Computes the minimum of numeric values.

## percentiles

Computes the percentiles (p50, p75, p90, p95 or p99) of numeric values.

## stddev

Computes the standard deviation of numeric or duration-valued facets.

## stdvar

Computes the standard variance of numeric or duration-valued facets.

## sum

Computes the sum of numeric or duration-valued facets.
