Using Microsoft Access. SQL entries booking (hotelNo, guestNo, dateFrom, dateTo,
ID: 3708751 • Letter: U
Question
Using Microsoft Access. SQL entries
booking (hotelNo, guestNo, dateFrom, dateTo, roomNo, rateBooked)
employee (empID, empFirst, empLast, empDateHired, empEmail, managerID, hotelNo)
guest (guestNo, guestFirst, guestLast, guestStreet, guestCity, guestState, guestPhone, guestEmail)
hotel (hotelNo, hotelName, hotelCity, hotelPhone)
room (roomNo, hotelNo, type, standardprice)
--------------------------------------------------------------------------------------------------
Query 3: change the name of the Holiday Inn in Tulsa to Holiday Inn Deluxe
Query 5: Add the following amenity to the database: hotel 6 has a swimming pool.
Query 6: Create a query that shows all of the guests and the bookings of those rooms. The result should include all guests, even those guests that have not booked any rooms. Show the guestNo, guestFirst, guestLast, HotelNo aand roomNo in the result.
Query 7: How many bookings have there been in each city?
Explanation / Answer
If tou have any doubts, please give me cooment...
--Query 3: change the name of the Holiday Inn in Tulsa to Holiday Inn Deluxe
UPDATE hotel SET hotelName='Holiday Inn Deluxe' WHERE hotelName='Holiday Inn' && hotelCity = 'Tulsa';
--- Query 5: Add the following amenity to the database: hotel 6 has a swimming pool.
-- sorry. there is no amentis table in this database
-- Query 6: Create a query that shows all of the guests and the bookings of those rooms. The result should include all guests, even those guests that have not booked any rooms. Show the guestNo, guestFirst, guestLast, HotelNo aand roomNo in the result.
SELECT G.guestNo, G.guestFirst, G.guestLast, R.hotelNo, B.roomNo
FROM (guest G LEFT OUTER JOIN booking B ON G.guestNo=B.guestNo) INNER JOIN room R ON B.hotelNo = R.hotelNo;
--- Query 7: How many bookings have there been in each city?
SELECT hotelCity, COUNT(*) AS no_of_bookings
FROM hotel INNER JOIN booking
GROUP BY hotelCity;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.