COMPOSITE

The COMPOSITE aggregation function allows you to combine existing aggregations, including other composite aggregations, together.

This page discusses:

See Also
RESULT SET
AGGREGATE
GROUP BY
Choose Where to Apply Aggregations

Configuration

Parameter Description
Expression The expression can only combine existing aggregations together.

Example: Calculate the Body Mass Index

In this example, you want to calculate the average body mass index (BMI) of a population. The BMI is the body mass divided by the square of the body height.

To make this calculation, you can use a composite aggregation that combines an aggregation for the average weight and an aggregation for the average height.