Question: Write the following SQL queries for the System. (codes) 1. Find the names of person having at least 3 stays during last 6 months. 2.
Write the following SQL queries for the System. (codes)
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.
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?
Assume that the current Date is December 15, 2020 while writing the SQL queries.
AVAILABILITY PREFERENCES Oo PREFERENCES CID TypeID Date NumberOfAvailableRooms 18 oo 18 RESERVATION Reservation Number Reservation CancellationDate CustomerlD TypeID Reservation Date CheckInDate CheckOutDate EstimatedPrice DiscountRate NumberOfAdults NumberOfChildren CUSTOMER Customer FirstName Middle Surname StreetAdress City 11 81 ROOM_TYPE TypeID Description Quantity DailyPrice ZIP RESERVATION_HISTORY Reservation Number CustomerID RoomType Reservation Date CheckInDate EstimatedCheckOutDate ActualCheckOutDate RoomNo MinibarConsumption LateFee TotalFee NumberOfChildren 18 ROOM PhoneNumber DOB Gender E-Mail IsMember Preferred-CC-No 00 RoomNumber TypeID Floor BedCapacity IsSmooking Room IsAvailable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
