> For the complete documentation index, see [llms.txt](https://resources.less.tech/less-tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://resources.less.tech/less-tech/modelling/action-guides/reshape/group-by.md).

# Group By

<figure><img src="/files/BGnaxZluGjQlVPvc2Eue" alt=""><figcaption><p>The Group By Action</p></figcaption></figure>

The Group By Actions is very used. It distributed data into certain groups (hence the name *group by*) and lets you aggregate some values within those groups. So "*group by customer type average session\_length*" could be translated to human language as "*put our data in the customer\_type groups and provide an average of the session length*". Group by's are used all the time and if you want an idea of they look in action, see the video below.

{% embed url="<https://www.loom.com/share/883465343b524aa2988623622531ad57>" %}
The Group By Action
{% endembed %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://resources.less.tech/less-tech/modelling/action-guides/reshape/group-by.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
