---
title: rollup() | Tiger Data Docs
description: Combine multiple counter aggregates
---

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

This function combines multiple counter 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:

```
rollup(
    cs CounterSummary
) RETURNS CounterSummary
```

| Name | Type             | Default | Required | Description                                                                                                                     |
| ---- | ---------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `cs` | `CounterSummary` | -       | ✔        | A counter aggregate created using [`counter_agg`](/docs/reference/toolkit/counters-and-gauges/counter_agg/counter_agg/index.md) |

## Returns

| Column | Type           | Description                                                               |
| ------ | -------------- | ------------------------------------------------------------------------- |
| rollup | CounterSummary | A new counter aggregate created by combining the input counter aggregates |
