> ## 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 TimeWeightSummaries

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

Combine multiple intermediate time-weighted aggregate (TimeWeightSummary) objects produced by time\_weight() into a
single intermediate TimeWeightSummary object. For example, you can use `rollup` to combine time-weighted aggregates from
15-minute buckets into daily buckets.

## Arguments

The syntax is:

```sql theme={"dark"}
rollup(
    tws TimeWeightSummary
) RETURNS TimeWeightSummary
```

| Name         | Type              | Default | Required | Description                                                     |
| ------------ | ----------------- | ------- | -------- | --------------------------------------------------------------- |
| time\_weight | TimeWeightSummary | -       | ✔        | The TimeWeightSummary aggregate produced by a time\_weight call |

## Returns

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

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