Simple Queries: Submit Your Work in Edmodo in 1 Week
Simple Queries: Submit Your Work in Edmodo in 1 Week
Simple Queries: Submit Your Work in Edmodo in 1 Week
where Hotel contains hotel details and hotelNo is the primary key;
Room contains room details for each hotel and (roomNo, hoteINo) forms the primary key;
Booking contains details of bookings and (hoteINo, guestNo, dateFrom) forms the primary key;
Guest contains guest details and guestNo is the primary key.
Simple queries
1. List full details of all hotels.
2. List full details of all hotels in London.
3. List the names and addresses of all guests living in London, alphabetically ordered by name.
4. List all double or family rooms with a price below 40.00 per night, in ascending order of
price.
5. List the bookings for which no dateTo has been specified.
Aggregate functions
6. How many hotels are there?
7. What is the average price of a room?
8. What is the total revenue per night from all double rooms?
9. How many different guests have made bookings for August?