> 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

Put data in categories and perform math within groups

<figure><img src="https://1596277999-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaSJL6Od4KuV8hrdCZbXp%2Fuploads%2Ffvgfs4TgzNARWuIBB6UA%2Fanimation_500_lacaug02.gif?alt=media&amp;token=8bb38590-e91a-43df-adc4-0ba89f008073" 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 %}
