> ## 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 one-dimensional statistical aggregates

<Icon icon="tag" iconType="duotone" /> Since [1.3.0][toolkit-1.3.0]

Combine multiple intermediate statistical aggregate (`StatsSummary1D`) objects produced by `stats_agg` (one variable)
into a single intermediate `StatsSummary1D` object. For example, you can use `rollup` to combine statistical aggregates
from 15-minute buckets into daily buckets.

For use in window functions, see `rolling()`.

## Arguments

The syntax is:

```sql theme={"dark"}
rollup(
    ss StatsSummary1D
) RETURNS StatsSummary1D
```

| Name    | Type           | Default | Required | Description                                              |
| ------- | -------------- | ------- | -------- | -------------------------------------------------------- |
| summary | StatsSummary1D | -       | ✔        | The statistical aggregate produced by a `stats_agg` call |

## Returns

| Column | Type           | Description                                                                        |
| ------ | -------------- | ---------------------------------------------------------------------------------- |
| rollup | StatsSummary1D | A new statistical aggregate produced by combining the input statistical aggregates |

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