SUM Function
The SUM function returns the sum of all the values
in the specified column or expression, as the following example shows:
SELECT SUM(total_price) FROM items WHERE order_num = 1013;
If you include the DISTINCT or UNIQUE keyword, the returned
sum is for only distinct values in the column or expression:
SELECT SUM(DISTINCT total_price) FROM items WHERE order_num = 1013;
NULL values are ignored unless every value in the column is NULL. If every column value is NULL, the SUM function returns a NULL for that column. You cannot use the SUM function with a non-numeric column.