Ashi M

Ashi M

  • NA
  • 3
  • 10.1k

Write the SQL statements for the following

Oct 21 2013 9:18 AM

Hi ,

I 'm new to DataBase, is there any one who can help me to this kind of questions answer.


Thanks

Ashi,



1.      The following tables form part of a database held in a relational DBMS:

Hotel (Hotel_No, Name, Address)
Room (Room_No, Hotel_No, Type, Price)
Booking (Hotel_No, Guest_No, Date_From, Date_To, Room_No)
Guest (Guest_No, Name, Address)

where Hotel contains hotel details and Hotel_No is the primary key Room contains room details for each hotel and (Hotel_No, Room_No) forms the primary key.

Booking contains details of the bookings and the primary key comprises (Hotel_No, Guest_No, Date From) and Guest contains guest details and Guest_No is the primary key.


Write the SQL statements for the following

1. What is the total daily revenue from all the double rooms?
2. How many different guests have made bookings for August, 2006?
3. List the price and type of all rooms at the hotel Land Mark.
4. What is the total income from bookings for the hotel Manor today?


Answers (6)