Question
Queries: Query 1: List the number of rooms in each hotel. You should display the name of the hotel and the count. Only display the
Queries:
Query 1: List the number of rooms in each hotel. You should display the name of the hotel and the count. Only display the hotels that have at least 5 rooms.
Query 2:Which guests (by first and last name and guest no) have booked rooms at the Hyatt for more than $90?
Query 3: Which hotel (by name) has the highest rate booked?
Query 4: Which hotels names do not have rooms with standard rates less than $150
Query 5: for each guest(by guest no) , which is the minimum rate at which they have booked rooms?
Query 6: Which hotels (by name) have been booked by guestno 8? You must use a subquery for this question.
DATABASE TABLES:
booking: hotelNo, guestNo, dateFrom, dateTo, roomNo, ratebooked
guest: guestNo, guestFirst, guestLast, guestStreet, guestCity, guestState, guestPhone, guestEmail
hotel: hotelNo, hotelName, hotelCity, hotelPhone
room: roomNo, hotelNo, type, standardprice
Example:
SELECT hotelName, roomNo, count(roomNo) FROM hotel, booking WHERE hotel.hotelNo=booking.hotelNo GROUP BY hotel.hotelName HAVING count(roomNo) >2;
Step 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