> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexprice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> **Aggregation types** define how usage is measured from incoming events. They are used to **calculate billable consumption** and form the foundation of usage-based billing. 

**Flexprice** supports the following **aggregation types:**

| Aggregation             | Description                                              | Transcription                                       |
| ----------------------- | -------------------------------------------------------- | --------------------------------------------------- |
| **COUNT**               | Counts event occurrences for basic usage tracking        | COUNT(DISTINCT events.id)                           |
| **SUM**                 | Aggregates numeric property values across events         | SUM(events.properties.property\_name)               |
| **AVERAGE**             | Computes mean values from event properties               | AVG(events.properties.property\_name)               |
| **COUNT UNIQUE**        | Tracks distinct property values for unique metrics       | COUNT\_DISTINCT(events.properties.property\_name)   |
| **LATEST**              | Captures the most recent property value by timestamp     | argMax(events.properties.property\_name, timestamp) |
| **SUM WITH MULTIPLIER** | Applies configurable rate multipliers to summed values   | SUM(events.properties.property\_name) \* multiplier |
| **MAX**                 | Identifies peak values with optional bucketing support   | MAX(events.properties.property\_name)               |
| **WEIGHTED SUM**        | Time-proportional aggregation for capacity-based billing | Weighted calculation based on event duration        |

All aggregation types except **COUNT** operate on event properties. **The result of this aggregation will be used to calculate charges.**

## Next Steps

* [COUNT Aggregation](/docs/product-catalogue/features/aggregation/count)
* [SUM Aggregation](/docs/product-catalogue/features/aggregation/sum)
* [AVERAGE Aggregation](/docs/product-catalogue/features/aggregation/average)
* [COUNT UNIQUE Aggregation](/docs/product-catalogue/features/aggregation/count-unique)
* [LATEST Aggregation](/docs/product-catalogue/features/aggregation/latest)
* [SUM WITH MULTIPLIER Aggregation](/docs/product-catalogue/features/aggregation/sum-with-multiplier)
* [MAX Aggregation](/docs/product-catalogue/features/aggregation/max)
* [WEIGHTED SUM Aggregation](/docs/product-catalogue/features/aggregation/weighted-sum)
