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

Use the data in tblReservations and tblGuests to create a query that calculates

ID: 3916748 • Letter: U

Question


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.
? ?Insert Columns Property Sheet ?Insert Rows Delete Columns Through Totals Parametors Builder Return: A Query Setup Show/Hide qryTotalRoom/Charges Guest? GuestlastName GurstsirstNiame Guestib ChecklnDte RoomType Value DiscountType tbkiuests

Explanation / Answer

If you have any doubts, please give me comment...

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

FROM tblReservations R, tblGuests G

WHERE R.GuestID = G.GuestID;

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