> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-poc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# rollup()

> Combine multiple gauge aggregates

<Icon icon="flask" /> Early access <Icon icon="tag" iconType="duotone" /> Since [1.6.0][toolkit-1.6.0]

This function combines multiple gauge aggregates into one. This can be used to combine aggregates from adjacent
intervals into one larger interval, such as rolling daily aggregates into a weekly or monthly aggregate.

## Arguments

The syntax is:

```sql theme={"dark"}
rollup(
    gs GaugeSummary
) RETURNS GaugeSummary
```

| Name | Type           | Default | Required | Description                                              |
| ---- | -------------- | ------- | -------- | -------------------------------------------------------- |
| `gs` | `GaugeSummary` | -       | ✔        | A gauge aggregate created using [`gauge_agg`][gauge-agg] |

## Returns

| Column | Type         | Description                                                           |
| ------ | ------------ | --------------------------------------------------------------------- |
| rollup | GaugeSummary | A new gauge aggregate created by combining the input gauge aggregates |

[gauge-agg]: /api-reference/timescaledb-toolkit/counters-and-gauges/gauge_agg/gauge_agg

[toolkit-1.6.0]: https://github.com/timescale/timescaledb-toolkit/releases/tag/1.6.0
