Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please tell which method is used ie jion etc a) Consider the following database schema (the Expedia database): Locations (Zipcoder City, State) Hotels HotelID, Name,
please tell which method is used ie jion etc
a) Consider the following database schema (the Expedia database): Locations (Zipcoder City, State) Hotels HotelID, Name, Lipcode, NumRooms) Searches Searchip, Zipcode, startDate, Duration, NumPeople) Results HotelId, searchID, Rank, Price) Hotels.Zipcode is a foreign key referring to Locations.Zipcode. Results.HotelID is a foreign key referring to Hotels HotelID. Searches.Zipcode is a foreign key referring to Locations.Zipcode. Results SearchID is a foreig key referring to Searches. SearchID. > Write a single SQL to answer the following: Get the names and cities of the top hotels (in increasing order of their rank) for the search request with SearchID 564 such that all the hotels output are in the same state as the state corresponding to the zipcode from the given search requestStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started