SQL query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mixyguy6
    New Member
    • Aug 2005
    • 2

    SQL query

    SQL query for

    List the guest details (Guest_No, Name, and Address) of all guests staying at the Grosvenor Hotel.
    Hotel (hotelNo, hotelName, city)
    Room (roomNo, hotelNo, type, price)
    Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
    Guest (guestNo, guestName, guestAddress)
  • richasaraf
    New Member
    • Aug 2005
    • 23

    #2
    Query !

    Originally posted by mixyguy6
    SQL query for

    List the guest details (Guest_No, Name, and Address) of all guests staying at the Grosvenor Hotel.
    Hotel (hotelNo, hotelName, city)
    Room (roomNo, hotelNo, type, price)
    Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
    Guest (guestNo, guestName, guestAddress)
    --------------------------------------------------------------------
    Hello !
    The query is as follows :

    select a.*
    from guest a, booking b, hotel c
    where a.guestNo = b.guestNo
    and b.hotelNo = c.hotelNo
    and hotelName = 'Grosvenor Hotel'


    Thanks ! :)

    Comment

    • ryblra
      New Member
      • Nov 2006
      • 1

      #3
      I have the same tabels and I need the queries for the following
      • List the number of rooms in each hotel with more than 100 rooms and located in London

      • What is the most commonly booked room type for each hotel in London?

      and I wish that some one help me

      Comment

      Working...