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? Write the following SQL queries for the Hotel Management System attached. Each

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 IsAvailable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!