SESSION NAME: SQL Functions - 1.
QUESTION NAME: Sum Function.
TABLE DESCRIPTION:
Write a query that prints the sum of the customerid,
quantity and price.
Note: Use SQL in-built Function to calculate the sum of
the tuples in items_ordered table.
The statement has to return a single result which
contains the sum value customerid, quantity and price
columns of everything returned in the items_ordered
table.
quantity and price.
Note: Use SQL in-built Function to calculate the sum of
the tuples in items_ordered table.
The statement has to return a single result which
contains the sum value customerid, quantity and price
columns of everything returned in the items_ordered
table.
CODE:
select sum(customerid),sum(quantity),sum(price) from items_ordered;
0 Comments