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:
Return the total amount of ordered items:
SELECT SUM(quantity)
FROM order_details;
Run Example »
Note: NULL values are ignored.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!