groupBy
groupBy groups column content into arrays.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| groupByColumns | String... | The column(s) by which to group data.
|
| groupByColumns | Collection<? extends ColumnName> | The column(s) by which to group data.
|
Returns
A new table containing grouping columns and grouped data. Column content is grouped into arrays.
Examples
In this example, groupBy creates an array of values for each column.
In this example, groupBy creates an array of values, as grouped by X.
In this example, groupBy creates an array of values, as grouped by X and Y.