Question: Examine the relational schema below. Write a SQL statement based on the data retrieval requirements. Guest Guest ID Name City State RESERVATION Reservation_ID Checkout Date

Examine the relational schema below. Write a SQL statement based on the data retrieval requirements. Guest Guest ID Name City State RESERVATION Reservation_ID Checkout Date Checkin_Date Number_or Guests Reservation Fee Discount (0) Payment Method Guest ID (FKO Hotel_ID (EK HOTEL Hotel ID Hotel Name Address (Ugroup) Ugroup) State (Ugroup Country (Ugroup) Postal Code (group) Brand_ID (FO ROOM Room Number Hotel ID (FO Room_Type Price_Per_Night Capacity Country Email (U) Reward_Points Icity BRAND Brand ID Brand Name Q1: e In the table ROOM, select rooms of which the room types are Duplex, Studio or Suite; For each of the selected room types, calculate the number of rooms (hint: COUNT (*)), the average price per night and the highest capacity; Display the room type and the calculated data, if the lowest price is above $100. . Q2: Display the guest ID, name, reservation ID, Checkin_Date, hotel ID, and hotel name, if the hotel name has the word "Resorts" and the hotel is located in New Zealand or Australia. Sort the result set by hotel ID in ascending order. Q3: . Select guests of which the guest IDs end with the letters "VIP"; For each of the selected guests, calculate the number of reservations, the total discounts, the average reservation fee; Display the guest ID, email, and the calculated data; Sort the result set first by the total reservation discounts in descending order and then by the guest ID in ascending order
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
