Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is in Microsoft Access Use the data in tblReservations and tblGuests to cre

ID: 3916742 • Letter: T

Question

This is in Microsoft Access

Use the data in tblReservations and tblGuests to create a query that calculates the guest’s total room charges. Your query results should display GuestFirstName, GuestLastName, ReservationID, CheckInDate, NightsStay, RoomRate, DiscountType, and a calculated field named TotalRoomCharges in that order. Subtract any discount from the total charges. In addition to the discount data in the database, AARP and AAA members receive a 10% discount. Military personnel receive a 20% discount. Guests without a discount should still have their total room charges calculated.

Use the data in tblReservations and tblGuests to create a query that calculates the guest’s total room charges. Your query results should display GuestFirstName, GuestLastName, ReservationID, CheckInDate, NightsStay, RoomRate, DiscountType, and a calculated field named TotalRoomCharges in that order. Subtract any discount from the total charges. In addition to the discount data in the database, AARP and AAA members receive a 10% discount. Military personnel receive a 20% discount. Guests without a discount should still have their total room charges calculated.

Explanation / Answer

SELECT GuestFirstName, GuestLastName, ReservationID, CheckInDate, NightsStay, RoomRate, DiscountType, NightsStay*RoomRate-(IIF([DiscountType]='AAA' OR [DiscountType]='AARP', NightsStay*RoomRate*0.10, IIF([DiscountType]='Military', NightsStay*RoomRate*0.20, 0))) AS TotalRoomCharges

FROM tblReservations R, tblGuests G

WHERE R.GuestID = G.GuestID;

Let me know if you have any clarifications. Thank you

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote