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

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

This aggregate combines the aggregates generated by other `max_n` aggregates and returns the maximum values found across all the aggregated data.

## Arguments

The syntax is:

```
rollup(
    agg MaxN
) MaxN
```

| Name  | Type | Default | Required | Description                   |
| ----- | ---- | ------- | -------- | ----------------------------- |
| `agg` | MaxN | -       | ✔        | The aggregates being combined |

## Returns

| Column | Type | Description                                       |
| ------ | ---- | ------------------------------------------------- |
| rollup | MaxN | An aggregate over all of the contributing values. |
