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

26. Complete and print your statements and results by spooling your file (with e

ID: 3708213 • Letter: 2

Question

26.       Complete and print your statements and results by spooling your file (with echo on from Oracle if available).

List the RoomNum, RoomTypeDesc, RateTypeDesc, and RateAmt for the room with the highest rate in Reservation 1005. Show the rate amount formatted as currency, and use the following column headings: Room, RoomType, RateType, Amt. Hint: use a nested SELECT.

ResDetail Customer CustlD CustFName CustLName CustPhone CustType LoyaltylD Reservation ResID CheckinDate CheckOutDate CustID AgentID ReslD Room CustType CustType CustTypeDesc RoomNum RateType RateAmt RoomType Agent AgentlD AgentFName AgentLName AgentType RateType RateType RateTypeDesc RoomType RoomType RoomTypeDesc AgentType AgentType AgentTypeDesc

Explanation / Answer

SELECT R1.RoomNum as Room, R2.RoomTypeDesc as RoomType, R3.RateTypeDesc as RateType,

('$'+R1.RateAmt) as Amt

FROM ResDetail R1, RoomType R2, RateType R3, Room R4

WHERE R1.RoomNum = R4.RoomNum AND R4.RoomType = R2.RoomType AND R1.RateType = R3.RateType

AND R1.ResID = (SELECT R.ResID FROM Reservation R WHERE R.AgentID = 1005);

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