Sum function

Updated at:

sum is an aggregate function that computes the total of all values in a column.

Syntax

sum(expression)

Arguments

ArgumentDescription
expressionThe column to sum.

Examples

Sum all values in column c1:

SELECT sum(c1) FROM test;