24. Complete and print your statements and results by spooling your file (with e
ID: 3708210 • Letter: 2
Question
24. Complete and print your statements and results by spooling your file (with echo on from Oracle if available).
List the room number, room type, and count of reservations for each room number. Be sure to include ALL rooms (not just those for which reservations exist). Sort by count.
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
Solution:
Query:
SELECT RoomNum, RoomType, COUNT( ResID) AS c FROM Reservation INNER JOIN ResDetail ON Reservation .ResID = ResDetail .ResID INNER JOIN Room ResDetail.RoomNum= Room.RooNum GROUP BY RoomNum ORDER BY c.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.