Question: Angie Question 2: Write the SOL Query language by using the Database Hotels includes the following tables: 14 Marks HOTEL Table Hotel No. HotelName
Angie " Question 2: Write the SOL Query language by using the Database Hotels includes the following tables: 14 Marks HOTEL Table Hotel No. HotelName City) ROOM Table (Room No Hotel No Type. Price ) GUEST Table (Guest No .Guest Name, GuestAddress) BOOKING Table (HotelNo, Guest No, DateFrom. Date To, RoomNo) Q2.1. Shows all hotel names which have "Single type rooms. 12 Mars] Answer: SELECT HTCI Name Quier query FROM HOTEL get in WHERE Hotel name of IN The reci from the C SELECT Rom Hotels Matei no FROM retro From Roon inner query WHERC Typestni inner query y returns Hotel No wir single type rooms 2.2 Create a view that list the number of rooms for each botel in Khobar, 12 Marks] nswer: Lur query sorSTE) SELECT Ekty Hotel No. COUNT(*) FROM SM FRON HOTEL MERE WHERE Ctry'knobar's HAVING COUNT + Se og FROM SELECT COUNTCHOK IVO) HAVING ( SELECT HOTEL NO. output number of rooms for each noter FROM HOTEL is displayed WHERE city == 'Khobar) group by hoci name (SELECT ROOM Chant SELECT IN saiger-cour SELECT COUNT(Hotel op NO HAVINK From HOTEL whee city ask mot Fyom mestions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
