Skip to main content

Module aggregation

Module aggregation 

Source
Expand description

Aggregation Framework

Provides aggregation functions for query results.

§Supported Functions

  • COUNT: Count rows (including COUNT(*) and COUNT DISTINCT)
  • SUM: Sum numeric values
  • AVG: Average of numeric values
  • MIN: Minimum value
  • MAX: Maximum value
  • STDDEV: Standard deviation
  • VARIANCE: Statistical variance
  • PERCENTILE: Nth percentile value

§GROUP BY

Aggregations can be grouped by one or more columns. HAVING clause filters groups after aggregation.

Structs§

AggregationDef
Definition of an aggregation to compute
AvgAggregator
AVG aggregator
CountAggregator
COUNT aggregator
CountDistinctAggregator
COUNT DISTINCT aggregator
GroupConcatAggregator
GROUP_CONCAT aggregator
MaxAggregator
MAX aggregator
MinAggregator
MIN aggregator
PercentileAggregator
Percentile aggregator
SampleAggregator
SAMPLE aggregator (returns first non-null value)
StdDevAggregator
Standard deviation aggregator
SumAggregator
SUM aggregator
VarianceAggregator
Variance aggregator

Traits§

Aggregator
Trait for aggregation functions

Functions§

create_aggregator
Create an aggregator by name
execute_group_by
1-pass streaming GROUP BY.
execute_having
Execute HAVING clause (filter on aggregated results)