← All nodes
Analytics

Group By

Groups rows by one column and returns a single row per group holding the group value and one aggregate.

When to use it

Use it when you need a total, an average or a count per category rather than the individual rows behind it.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
Group By ColumnselectYes—
Aggregate ColumnselectYes—
Aggregate FunctionselectYescount

Example

Total sales per region

  • Group By Column=Region
  • Aggregate Column=Amount
  • Aggregate Function=Sum
Input rows
RegionRepAmount
NorthAna120
SouthBo80
NorthCal40
Result
Regionsum
North160
South80

The result keeps only two columns: the group column and one named after the function, so Rep is dropped.

Worth knowing

  • The aggregate column is read as a number, and a value that is not numeric counts as zero.
  • Count counts the rows in each group, so the aggregate column choice does not change its result.
  • Groups appear in the order their first row was seen, not sorted.
  • Add a Rename Column node after it when the downstream step expects a friendlier name than sum or avg.

Others in Analytics