---
title: "groupBy"
sidebar_label: "groupBy"
description: "Kotlin binding reference: groupBy."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Table](index.md)/[groupBy](groupBy.md)

# groupBy

[common]\
fun [groupBy](groupBy.md)(keys: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)&gt;, aggs: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[AggSpec](../AggSpec/index.md)&gt;): [Table](index.md)

Group by [keys](groupBy.md) and apply [aggs](groupBy.md): one row per group, the key columns then one column per aggregation.