Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What is the name of the tourist attraction that is associated with the photo "game1"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Which tourist attraction is associated with the photo "game1"? Return its name. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the names and descriptions of the photos taken at the tourist attraction "film festival"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Find the names and descriptions of the photos taken at the tourist attraction called "film festival". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the details and ways to get to tourist attractions related to royal family? [/INST]

Output: SELECT T1.Royal_Family_Details ,  T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID  =  T2.Tourist_Attraction_ID;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Which tourist attractions are related to royal family? Tell me their details and how we can get there. [/INST]

Output: SELECT T1.Royal_Family_Details ,  T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID  =  T2.Tourist_Attraction_ID;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the details of the shops that can be accessed by walk? [/INST]

Output: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Find the details of the shops that can be reached by walk. [/INST]

Output: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What is the name of the staff that is in charge of the attraction named "US museum"? [/INST]

Output: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "US museum";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Tell me the name of the staff in charge of the attraction called "US museum". [/INST]

Output: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "US museum";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the details of the markets that can be accessed by walk or bus? [/INST]

Output: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk" OR  T2.How_to_Get_There  =  "bus";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Find the details of all the markets that are accessible by walk or bus. [/INST]

Output: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk" OR  T2.How_to_Get_There  =  "bus";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the visit date and details of the visitor whose detail is 'Vincent'? [/INST]

Output: SELECT T2.Visit_Date ,  T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID  =  T2.Tourist_ID WHERE T1.Tourist_Details  =  "Vincent";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Find the visit date and details of the tourist whose detail is 'Vincent' [/INST]

Output: SELECT T2.Visit_Date ,  T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID  =  T2.Tourist_ID WHERE T1.Tourist_Details  =  "Vincent";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Which tourist attractions does the visitor with detail 'Vincent' visit? [/INST]

Output: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID  =  T3.Tourist_ID WHERE T3.Tourist_Details  =  "Vincent";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the tourist attractions visited by the tourist whose detail is 'Vincent'. [/INST]

Output: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID  =  T3.Tourist_ID WHERE T3.Tourist_Details  =  "Vincent";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there? [/INST]

Output: SELECT T1.Name ,  T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" OR T2.Tourist_Details  =  "Vivian";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there. [/INST]

Output: SELECT T1.Name ,  T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID  =  T3.Tourist_Attraction_ID AND T2.Tourist_ID  =  T3.Tourist_ID WHERE T2.Tourist_Details  =  "Vincent" OR T2.Tourist_Details  =  "Vivian";


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the average price of hotels for each star rating code. [/INST]

Output: SELECT star_rating_code ,  avg(price_range) FROM HOTELS GROUP BY star_rating_code;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What is the average price range of hotels for each each star rating code? [/INST]

Output: SELECT star_rating_code ,  avg(price_range) FROM HOTELS GROUP BY star_rating_code;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the average price of hotels for different pet policy. [/INST]

Output: SELECT pets_allowed_yn ,  avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the average prices of hotels grouped by their pet policy. [/INST]

Output: SELECT pets_allowed_yn ,  avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the id and star rating of each hotel, ordered by its price from low to high. [/INST]

Output: SELECT hotel_id ,  star_rating_code FROM HOTELS ORDER BY price_range ASC;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Find the id and star rating of each hotel and sort them in increasing order of price. [/INST]

Output: SELECT hotel_id ,  star_rating_code FROM HOTELS ORDER BY price_range ASC;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the details of the top 3 most expensive hotels. [/INST]

Output: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the details of the three most expensive hotels? [/INST]

Output: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the details and star ratings of the 3 least expensive hotels. [/INST]

Output: SELECT other_hotel_details ,  star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: What are the details and star ratings of the three hotels with the lowest price ranges? [/INST]

Output: SELECT other_hotel_details ,  star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the transportation method most people choose to get to tourist attractions. [/INST]

Output: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Which transportation method is used the most often to get to tourist attractions? [/INST]

Output: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show the description and code of the attraction type most tourist attractions belong to. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Which attraction type does the most tourist attractions belong to? Tell me its  attraction type description and code. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Hotel_Star_Ratings :
star_rating_code [ TEXT ] primary_key
star_rating_description [ TEXT ]

Locations :
Location_ID [ INT ] primary_key
Location_Name [ TEXT ]
Address [ TEXT ]
Other_Details [ TEXT ]

Ref_Attraction_Types :
Attraction_Type_Code [ TEXT ] primary_key
Attraction_Type_Description [ TEXT ]

Visitors :
Tourist_ID [ INT ] primary_key
Tourist_Details [ TEXT ]

Features :
Feature_ID [ INT ] primary_key
Feature_Details [ TEXT ]

Hotels :
hotel_id [ INT ] primary_key
star_rating_code [ TEXT ] Hotels.star_rating_code = Ref_Hotel_Star_Ratings.star_rating_code
pets_allowed_yn [ TEXT ]
price_range [ INT ]
other_hotel_details [ TEXT ]

Tourist_Attractions :
Tourist_Attraction_ID [ INT ] primary_key
Attraction_Type_Code [ TEXT ] Tourist_Attractions.Attraction_Type_Code = Ref_Attraction_Types.Attraction_Type_Code
Location_ID [ INT ] Tourist_Attractions.Location_ID = Locations.Location_ID
How_to_Get_There [ TEXT ]
Name [ TEXT ]
Description [ TEXT ]
Opening_Hours [ TEXT ]
Other_Details [ TEXT ]

Street_Markets :
Market_ID [ INT ] primary_key Street_Markets.Market_ID = Tourist_Attractions.Tourist_Attraction_ID
Market_Details [ TEXT ]

Shops :
Shop_ID [ INT ] primary_key Shops.Shop_ID = Tourist_Attractions.Tourist_Attraction_ID
Shop_Details [ TEXT ]

Museums :
Museum_ID [ INT ] primary_key Museums.Museum_ID = Tourist_Attractions.Tourist_Attraction_ID
Museum_Details [ TEXT ]

Royal_Family :
Royal_Family_ID [ INT ] primary_key Royal_Family.Royal_Family_ID = Tourist_Attractions.Tourist_Attraction_ID
Royal_Family_Details [ TEXT ]

Theme_Parks :
Theme_Park_ID [ INT ] primary_key Theme_Parks.Theme_Park_ID = Tourist_Attractions.Tourist_Attraction_ID
Theme_Park_Details [ TEXT ]

Visits :
Visit_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Visits.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Tourist_ID [ INT ] Visits.Tourist_ID = Visitors.Tourist_ID
Visit_Date [ TEXT ]
Visit_Details [ TEXT ]

Photos :
Photo_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Photos.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Description [ TEXT ]
Filename [ TEXT ]
Other_Details [ TEXT ]

Staff :
Staff_ID [ INT ] primary_key
Tourist_Attraction_ID [ INT ] Staff.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Name [ TEXT ]
Other_Details [ TEXT ]

Tourist_Attraction_Features :
Tourist_Attraction_ID [ INT ] primary_key Tourist_Attraction_Features.Tourist_Attraction_ID = Tourist_Attractions.Tourist_Attraction_ID
Feature_ID [ INT ] Tourist_Attraction_Features.Feature_ID = Features.Feature_ID

Please write me a SQL statement that answers the following question: Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. [/INST]

Output: SELECT How_to_Get_There ,  COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There;