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