List the details of all rooms at the Grosvenor Hotel, including the name of the guest staying in the room, if the room is occupied.

What will be an ideal response?

SELECT r.* FROM Room r LEFT JOIN
(SELECT g.guestName, h.hotelNo, b.roomNo FROM Guest g, Booking b, Hotel h
WHERE g.guestNo = b.guestNo AND b.hotelNo = h.hotelNo AND
hotelName= ‘Grosvenor Hotel’ AND
dateFrom <= CURRENT_DATE AND
dateTo >= CURRENT_DATE) AS XXX
ON r.hotelNo = XXX.hotelNo AND r.roomNo = XXX.roomNo;

Computer Science & Information Technology

You might also like to view...

The contents of memory on a running system will change for no apparent reason while the system is sitting there doing nothing

a. True b. False

Computer Science & Information Technology

Which method of determining the efficiency of algorithms allows you to rate them independently of timings or instruction counts?

A. elapsed time profiling B. byte-code assembly C. complexity analysis D. memory usage analysis

Computer Science & Information Technology