> ## 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()

> Roll up multiple Candlestick aggregates

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

Combine multiple intermediate candlestick aggregates, produced by `candlestick_agg` or `candlestick`, into a single
intermediate candlestick aggregate. For example, you can use `rollup` to combine candlestick aggregates from 15-minute
buckets into daily buckets.

## Arguments

The syntax is:

```sql theme={"dark"}
rollup(
  candlestick Candlestick
) RETURNS Candlestick
```

| Name        | Type        | Default | Required | Description                                                         |
| ----------- | ----------- | ------- | -------- | ------------------------------------------------------------------- |
| candlestick | Candlestick | -       | ✔        | The aggregate produced by a `candlestick` or `candlestick_agg` call |

## Returns

| Column      | Type        | Description                                                                        |
| ----------- | ----------- | ---------------------------------------------------------------------------------- |
| candlestick | Candlestick | A new candlestick aggregate produced by combining the input candlestick aggregates |

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