Column Data Type Size Constraint Description
Name
Item_No INT 8 PRIMARY KEY Item number
Item_name VARCHAR 30 Cannot be blank Name of Item
Category VARCHAR 25 By default should be accessories Type of Item
Stock INT 2 MUST BE BETWEEN 50 TO 60 Quantity available
Price FLOAT 7,2 Price of the item
2. Room_No, Cust_Name, Room_Type and Room_Rent of table “HOTEL” are
given below:
Table : HOTEL
Room_No Cust_Name Room_Type Room_Rent
204 Rajesh Single 700
308 Anuja Double AC 1600
105 Vinamra Single 500
202 Soma
Based on this information, find output of the following queries:
(I) SELECT Room_Type, SUM(Room_Rent) FROM hotel GROUP BY Room_Type;
(II) SELECT Room_no FROM hotel WHERE Cust_Name LIKE ‘%n%;
3)Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to
(vi) on the basis of the table Shop.
No. Shop_name Sale Area Cust_percent Rating City
1 West side 250000 North 68.6 C Delhi
2 Pantaloons 500000 South 81.8 A Chennai
3 Sir’s & Her’s 300000 North 79.8 B Amritsar
4 Sports king 380000 West 88.0 B Baroda
5 Biswas stores 456000 North 92.0 A Delhi
6 Big Bazar 290000 East 66.7 A Kolkota