human
Schema:
Ref_Hotel_Star_Ratings (star_rating_code, star_rating_description)
Locations (Location_ID, Location_Name, Address, Other_Details)
Ref_Attraction_Types (Attraction_Type_Code, Attraction_Type_Description)
Visitors (Tourist_ID, Tourist_Details)
Features (Feature_ID, Feature_Details)
Hotels (hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details)
Tourist_Attractions (Tourist_Attraction_ID, Attraction_Type_Code, Location_ID, How_to_Get_There, Name, Description, Opening_Hours, Other_Details)
Street_Markets (Market_ID, Market_Details)
Shops (Shop_ID, Shop_Details)
Museums (Museum_ID, Museum_Details)
Royal_Family (Royal_Family_ID, Royal_Family_Details)
Theme_Parks (Theme_Park_ID, Theme_Park_Details)
Visits (Visit_ID, Tourist_Attraction_ID, Tourist_ID, Visit_Date, Visit_Details)
Photos (Photo_ID, Tourist_Attraction_ID, Name, Description, Filename, Other_Details)
Staff (Staff_ID, Tourist_Attraction_ID, Name, Other_Details)
Tourist_Attraction_Features (Tourist_Attraction_ID, Feature_ID)
Please answer with SQL.
assistant
Sure, I understand.
human
Show the description and code of the attraction type most tourist attractions belong to.
assistant
SELECT T1.Attraction_Type_Description , T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
human
What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?
assistant
SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = '660 Shea Crescent' OR T2.How_to_Get_There = 'walk'
human
What are the names of the tourist attractions that can be accessed by bus?
assistant
SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = 'bus'
human
What are the names of the tourist attractions that have parking or shopping as their feature details?
assistant
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'
human
What are the names and descriptions of the photos taken at the tourist attraction 'film festival'?
assistant
SELECT T1.Name , T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = 'film festival'
human
What is the name of the tourist attraction that is associated with the photo 'game1'?
assistant
SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1" ;