Complete and print the following SQL transactions. Log your statements and resul
ID: 3708074 • Letter: C
Question
Complete and print the following SQL transactions. Log your statements and results by spooling your file (with echo on from Oracle if available).
List the room number, room type, room type description, rate type, and rate amount for each room for which reservations exist. Sort by room number then by rate amount.
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 AgentTypeDescExplanation / Answer
List the room number, room type, room type description, rate type, and rate amount for each room for which reservations exist. Sort by room number then by rate amount.
SELECT R1.RoomNum, R2.RoomType, R2.RoomTypeDesc, R1.RateType, R1.RateAmt
FROM ResDetail R1, Room R2, RoomType R3
WHERE R1.RoomNum = R2.RoomNum AND R2.RoomType = R3.RoomType
ORDER BY R1.RoomNum, R1.RateType;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.