PostgreSQL Function Reference

SUM
Returns the sum of a set of values.
PostgreSQL 17.5
SUM(expression)
expression
The expression to sum.
Examples
PostgreSQL 17.5
SELECT SUM(amount * unit_price)
FROM Payments;