# Grouping Records

> Part of the NocoDB documentation (Product docs > Tables > Table Operations > Work with Data). Index of all pages: https://nocodb.com/llms.txt. Any docs page is available as Markdown by adding `.md` to its URL.

URL: https://nocodb.com/docs/product/tables/table-operations/group-by
Last updated: 2026-09-25

Learn how to group records in NocoDB.

<img alt="Grouping records" src={__img0} placeholder="blur" />

Grouping records in NocoDB helps you organize data by categories using **Groups** and **Subgroups**. You can group records by up to **three levels**, making it easier to analyze and navigate complex datasets.

<AskNocoAI>
  <Prompt>
    Group this view by [Status]
  </Prompt>

  <Prompt>
    Group this view by [Owner], then by [Priority]
  </Prompt>

  <Prompt>
    Remove grouping from this view
  </Prompt>
</AskNocoAI>

## Add or edit groups

1. Click **Group By** in the toolbar.
2. Select the field to group records by.
3. (Optional) Sort the groups in ascending or descending order.
4. (Optional) Use `+ New Subgroup` to create a subgroup within the selected group.

<img alt="Group By" src={__img1} placeholder="blur" />

<Callout type="info">
  You can add up to 

  **three levels of grouping**

   to further refine your data view.
</Callout>

Link fields can be used for grouping when each record links to a single parent: belongs-to, one-to-one, and many-to-one links. Records are grouped by the linked record's display value. Adding a record inside a group pre-fills the belongs-to or many-to-one link with that group's record.

## Enable or disable a group

You can switch a grouping off without removing it, then turn it back on later with the same settings intact.

1. Click **Group By** in the toolbar.
2. Use the checkbox next to a group to enable or disable it.

<img alt="Group By toggle" src={__img2} placeholder="blur" />

A disabled grouping keeps its field and sort configuration, so it is handy for temporarily flattening the view or comparing grouped and ungrouped layouts without rebuilding the setup.

## Delete groups

1. Click **Group By** in the toolbar.
2. Click the 🗑 icon next to the group you want to remove.

<Callout type="info">
  To return to the standard grid view, remove all configured groups.
</Callout>

<img alt="Group By" src={__img3} placeholder="blur" />

## Expand and collapse groups

Click a group header to collapse or expand that group. For bulk actions, open the `...` menu on a group header:

* **Expand group** / **Collapse group** — applies to the current group and its subgroups.
* **Expand all** / **Collapse all** — applies to every group at that level.

<img alt="Expand and collapse options in the group header menu" src={__img4} placeholder="blur" />

## Group level field aggregations

You can perform aggregations on fields at each group level. This allows you to summarize data within each group, such as calculating totals or averages.

<img alt="Group Aggregation" src={__img5} placeholder="blur" />

---

## Related pages

- [Hide & Reorder Fields](https://nocodb.com/docs/product/tables/table-operations/field-operations.md): Learn how to hide and reorder fields in NocoDB.
- [Filtering Records](https://nocodb.com/docs/product/tables/table-operations/filter.md): Learn how to filter records in NocoDB.
- [Sorting Records](https://nocodb.com/docs/product/tables/table-operations/sort.md): Learn how to sort records in NocoDB.
- [Colouring Records](https://nocodb.com/docs/product/tables/table-operations/record-colouring.md): Learn how to colour records and individual fields in NocoDB.
- [Record Height](https://nocodb.com/docs/product/tables/table-operations/row-height.md): Learn how to adjust the height of records in NocoDB.
- [Freeze Fields](https://nocodb.com/docs/product/tables/table-operations/freeze-fields.md): Keep up to three fields pinned in place while scrolling horizontally in Grid view.
- [Search](https://nocodb.com/docs/product/tables/table-operations/search.md): Learn how to search for records in NocoDB.
- [Realtime Presence](https://nocodb.com/docs/product/tables/table-operations/realtime-presence.md): See who else is working in a table, live, with per-collaborator markers in the grid.
