SUM
An aggregate function adding the non-NULL numeric values in a group.
What is SUM in a relational database?
SUM — An aggregate function adding the non-NULL numeric values in a group.
SELECT customer_id, SUM(total_amount) AS order_total
FROM purchase_order
GROUP BY customer_id;
Level: Apprentice · More Database terms at this level
Updated