Skip to main content
Version: 0.16

Aggregation Queries

Metric Aggregations

In GreptimeDB, metric aggregations are used to perform statistical calculations on numeric fields, such as sum, average, maximum, minimum, etc.

AggregationStatusDescription
sumAggregates to calculate the sum of numeric fields.
avgAggregates to calculate the average of numeric fields.
maxAggregates to calculate the maximum value of numeric fields.
minAggregates to calculate the minimum value of numeric fields.
countAggregates to calculate the number of documents.

Bucket Aggregations

In GreptimeDB, bucket aggregations are used to group documents, such as bucketing by time, category, or other fields.

AggregationStatusDescription
date_histogramAggregates to bucket by time fields.
termsAggregates to group by values of specified