Assignment 2
Assignment 2
I1.i_price = I2.min_price;
1 row in set (0.01 sec)
11. Display the item with maximum price
mysql> select I1.i_num,I1.i_name,I1.i_type,I1.i_price,I1.i_count from
items as I1, (select max(i_price) as max_price from items) as I2 where
I1.i_price = I2.max_price;
1 row in set (0.00 sec)
12. Display the customers having mobile number as 982
mysql> select * from customer where c_mobile like '982%';
Empty set (0.00 sec)
purchase;
12 rows in set (0.00 sec)
c) Day Month Year (dd-mm-yy)
mysql> SELECT DATE_FORMAT(p_date, '%D %M %Y (%d-%m-%y)')
AS date FROM purchase;