If you wanted to calculate the sum of any numeric field in the table then you use sum function
syntax:
select sum(quantity) as total quantity from products;
When you run the above SQL query, SQL will add all the value under the quantity and display the sum value.
syntax:
select sum(quantity) as total quantity from products;
When you run the above SQL query, SQL will add all the value under the quantity and display the sum value.
No comments:
Post a Comment