Consider a database with the following relations: Hotel (Hotel ID, H_Name, H_Address, H_City, Maximum_Capacity) Guest (G

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Consider a database with the following relations: Hotel (Hotel ID, H_Name, H_Address, H_City, Maximum_Capacity) Guest (G

Post by answerhappygod »

Consider A Database With The Following Relations Hotel Hotel Id H Name H Address H City Maximum Capacity Guest G 1
Consider A Database With The Following Relations Hotel Hotel Id H Name H Address H City Maximum Capacity Guest G 1 (61.91 KiB) Viewed 22 times
1. Display Guests (by name) who booked morethan 5 nights between January 1st, 2022 (included) and March 1st,2022 (included).
2. Display the minimum, maximum, andaverage price per night for rooms of type 'Suite' in hotels locatedin the city of Chicago, and give a short name for each of therequested output values.
3. for each of the guests' cities, displaythe city name and count the number of guests. Sort the answer withrespect to the city name, in descending order.
4. For each room type in "Chicago" locatedhotels, display the type and the hotel's name in the descendingorder of the type.
We are interested only in the types with an average price pernight of 120$ or more.
Consider a database with the following relations: Hotel (Hotel ID, H_Name, H_Address, H_City, Maximum_Capacity) Guest (Guest_ID, G_Name, G_Address, G_City) Room (Hotel ID, Room_Number, Type, Price_Per_Night) Booking (Guest_ID, Hotel_ID, Room Number, From_Date, To_Date, Number_of_Nights) Build the following queries in SQL.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply