Question
Write the following SQL queries for the Hotel Management System attached. Each students have to answer only 3 of the questions below. The question assignments
Write the following SQL queries for the Hotel Management System attached. Each students have to answer only 3 of the questions below. The question assignments are given below for each student individually. Assume that the current Date is December 15, 2020 while writing the SQL queries.
1) Find the names of person having at least 3 stays during last 6 months.
2) Find the person paying most during last 6 months.
3) Find the most preferable room type based on past reservations?
4) Find the person paying late fee most during last 6 months.
5) What is the total revenue for the last month?
6) Which room types are not available on December 26th and 27th, 2020?7) What is the average number of person staying per room during last 2 months?
8) What is the most common room type for the current reservations? Please include the description of the room type.
9) Which rooms with 1 bed capacity are currently available now?
10) Which customers have checked out late during last month?
AVAILABILITY PREFERENCES RESERVATION 1 TypeID 1 PREFERENCES 1 CID Date NumberOfAvailableRooms ROOM_TYPE Reservation Number Reservation CancellationDate CustomerlD TypeID Reservation Date CheckinDate Checkout Date Estimated Price DiscountRate NumberOfAdults NumberOfChildren CUSTOMER 1 CustomerID FirstName Middle Surname StreetAdress City ZIP Phone Number DOB Gender E-Mail Is Member Preferred-CC-NO TypeID Description Quantity DailyPrice RESERVATION_HISTORY 1 Reservation Number Customerid RoomType Reservation Date CheckInDate EstimatedCheckOutDate ActualCheckOutDate Room No MinibarConsumption LateFee TotalFee NumberOfChildren NumberOfAdults ROOM 1 RoomNumber TypeID Floor BedCapacity IsSmooking Room IsAvailableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started