Question: Query 1 5 Retrieve the bookings when the guest stayed for more nights than the average nights of stay for the room type that the
Query
Retrieve the bookings when the guest stayed for more nights than the average nights of stay for the room type that the guest booked, and the address of the guest begins with 'Birmingham'.
This question requires use of a Common Table Expression CTE
For each booking, report the guest ID booking ID and the number of nights of the booking.
Order results by guest ID
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
