The SQLite SUM aggregate function is used to get the total summed value of an expression.
Syntax:
SELECT SUM(aggregate_expression) FROM tables [WHERE conditions];
SELECT SUM(aggregate_expression)
FROM tables
[WHERE conditions];