This is one of my questions in Microsoft Access Use the data in tblReservations
ID: 3916746 • Letter: T
Question
This is one of my questions in Microsoft AccessUse the data in tblReservations and tblRoomCharges to create a query that calculates the attendants’ gratuity on a room service order (18%) or spa treatment (25%). Your query results should display ReservationID, CheckInDate, ChargeCategory, ChargeAmount, and a calculated field named Gratuity in that order. If the ChargeCategory is not a spa treatment or room service, a zero should be displayed in the field.
te Insert Rows . Insert Columns FProperty Sheet nion ?Table Names ass-Through x Delete Rows Delete Columns Show Totals Parameters ata Definition Table Builder Return: All Query Setup Show/Hide ips tbiReservations tblRoomCharges Guestlo CheckinDate NightsStay NumberOfGuests Crib Room Charger) GuestiD ReservationiD ChargeCategory ChargeAmount RoomType RoomType.Value DiscountType
Explanation / Answer
If you have any doubts, please give me comment..
SELECT ReservationID, CheckInDate, ChargeCategory, ChargeAmount, IIF([ChargeCategory]='Room Service', 18, IIF([ChargeCategory] = 'SPA treatment', 25, 0)) AS Gratuity
FROM tblReservations R, tblRoomCharges RC
WHERE R.ReservationID = RC.ReservationID;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.