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

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

This aggregate combines the aggregates generated by other `min_n_by` aggregates and returns the minimum values and associated data found across all the aggregated data.

## Arguments

The syntax is:

```
rollup(
    agg MinNBy
) MinNBy
```

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

## Returns

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