Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Support For Data Mining Applications Discovering Knowledge With Inductive Queries Lnai 2682

Authors: Rosa Meo ,Pier L. Lanzi ,Mika Klemettinen

2004th Edition

3540224793, 978-3540224792

More Books

Students also viewed these Databases questions