SUM
The SUM() function returns the total sum of a numeric column.
The following SQL statement finds the sum of the quantity fields in the order_details table:
Example
SELECT SUM(quantity)
FROM order_details;
Note: NULL values are ignored.
The SUM() function returns the total sum of a numeric column.
The following SQL statement finds the sum of the quantity fields in the order_details table:
SELECT SUM(quantity)
FROM order_details;
Note: NULL values are ignored.
Join Aivasu Tech Institute's PostgreSQL course — live mentorship, real projects, and 100% placement support.
Enroll Now — Free Demo Available✳ Common questions
Quick answers about learning PostgreSQL SUM in PostgreSQL.