实例 PostgreSQL 使用 SUM 函数实例

 
SELECT SUM(quantity)
FROM order_details;        
                    

输出结果

 sum
-------
 51317
(1 row)