firstBy
firstBy returns the first row for each group.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| groupByColumns | String... | The column(s) by which to group data.
|
| groupByColumns | ColumnName... | The column(s) by which to group data.
|
| groupByColumns | Collection<String> | The column(s) by which to group data.
|
Returns
A new table containing the first row for each group.
Examples
In this example, firstBy returns the first row of the table.
In this example, firstBy returns the first row, as grouped by X.
In this example, firstBy returns the first row, as grouped by X and Y.