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

Use the data in tblReservations, tblPayments, and qryTotalRoomCharges to create

ID: 3916790 • Letter: U

Question


Use the data in tblReservations, tblPayments, and qryTotalRoomCharges to create a query to see what the total charges will be for each guest. Your query results should display ReservationID, CheckInDate, NightsStay, RoomRate, and TotalRoomCharges from qryTotalRoomCharges, PmtAmount from tblPayments, and DiscountType from tblReservations. Create a new field named AmountDue that calculates whether an amount is due. (Hint: If the total room charges are more than the payment amount, then the guest owes money.) Create a new field named RefundDue that calculates whether a refund is owed to a guest.

Explanation / Answer

select c.ReservationId, c.CheckinDate, c.NightsStya, c.Roommate, c.TotalRoomCharges, p.pmtAmount , r.DiscountType, case when c.TotalRoomCharges>p.pmtAmount then "yes" then "no" end as AmountDue from qryTotalRoomCharges as c, tblReservations as r,tblPayments as p

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