SUMBY
Sums a list of numbers, partitioned by the unique values of a separate column
SUMBY( column
, partition column
)
Sums the values within a column
when grouped by unique values within a partition column
SUMBY() is a window function, which performs SUM() except partitioned by the unique values of a separate column.
Arguments
Arguments | Description |
| Column to sum |
| Column containing unique values |
Output
Outputs a sum of values when grouped by partition column
Example
Last updated