Skip to content

Returns the sum of all values in a group.

func.sum(get_column(table, 'amount'))
func.sum(get_column(table, 'amount'))
SUM(<amount>)
SELECT department, SUM(salary) FROM employees GROUP BY department;
┌────────────┬─────────────┐
│ department │ sum(salary) │
├────────────┼─────────────┤
│ Sales │ 195000
│ IT │ 246000
│ HR │ 210000
└────────────┴─────────────┘