Group & Aggregate
Group rows by one or more columns and compute aggregate functions like SUM, AVG, COUNT, MIN, MAX, and more.
What It Does
Group & Aggregate collapses rows into groups based on the values in one or more columns, then computes aggregate values for each group. This is the visual equivalent of SQL's GROUP BY clause. You can add multiple aggregations in a single step.
If you omit the grouping columns, the aggregation runs across the entire table and returns a single row.
How to Use It
Opening the Panel
Click the + button in the toolbar or open the operation picker, then search for "Group". It is in the Aggregate group.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
Group by columns | Multi-column select | No | Columns to group by. If omitted, aggregates span the entire table. |
Aggregates | List of (column + function + alias) | Yes (at least 1) | Each aggregate specifies a column, a function, and an optional output name. Supported functions: SUM, AVG, COUNT, MIN, MAX, COUNT_DISTINCT, MEDIAN, STRING_AGG. |
Aggregate Functions
| Function | Description |
|---|---|
SUM | Total of all values in the group |
AVG | Mean value |
COUNT | Number of rows |
MIN | Smallest value |
MAX | Largest value |
COUNT_DISTINCT | Number of unique values |
MEDIAN | Median value |
STRING_AGG | Concatenates text values with a comma separator |
SQL generated under the hood
SELECT region, SUM(revenue) AS revenue_sum, COUNT(*) AS order_count
FROM data
GROUP BY region
Related Operations
- Pivot - Pivot table (rows to columns)
- Window Function - Rank, row number, lead, lag
- Smallest - Get nth smallest value as a column
- Largest - Get nth largest value as a column