Please explain, in plain British, what question this SQL query solutions:
SELECT SUM(price) FROM Room r, Hotel h WHERE r.hotelNo = h.hotelNo and hotelName = 'Paris Hilton' and roomNo NOT IN (SELECT roomNo FROM Booking b, Hotel h WHERE (dateFrom <= CURRENT_DATE AND dateTo >= CURRENT_DATE) AND b.hotelNo = h.hotelNo AND hotelName = 'Paris Hilton');
I am presuming you are asking exactly what does that question do in plain British:
Just how much wouldn't it cost to book all rooms in the "Paris Hilton" hotel which are vacant today?
This question seems to come back the sum prices of all of the rooms within the Paris Hilton hotel which are not reserved for today.
question could be like,
discover listing of room that aren't reserved to date till today within the hotel "Paris Hilton" and return the sum of the that amount.
This really is most likely designed to represent the entire cost of rooms available by today in the "Paris Hilton" hotel. Why they're blocking on HotelNo and HotelName.
I suppose the question could be:
What's the total worth of rooms available by today in the "Paris Hilton" hotel?