Input:
[INST] Here is a database schema:
Investors :
investor_id [ INT ] primary_key
Investor_details [ TEXT ]

Lots :
lot_id [ INT ] primary_key
investor_id [ INT ] Lots.investor_id = Investors.investor_id
lot_details [ TEXT ]

Ref_Transaction_Types :
transaction_type_code [ TEXT ] primary_key
transaction_type_description [ TEXT ]

Transactions :
transaction_id [ INT ] primary_key
investor_id [ INT ] Transactions.investor_id = Investors.investor_id
transaction_type_code [ TEXT ] Transactions.transaction_type_code = Ref_Transaction_Types.transaction_type_code
date_of_transaction [ TEXT ]
amount_of_transaction [ INT ]
share_count [ TEXT ]
other_details [ TEXT ]

Sales :
sales_transaction_id [ INT ] primary_key Sales.sales_transaction_id = Transactions.transaction_id
sales_details [ TEXT ]

Purchases :
purchase_transaction_id [ INT ] Purchases.purchase_transaction_id = Transactions.transaction_id
purchase_details [ TEXT ]

Transactions_Lots :
transaction_id [ INT ] Transactions_Lots.transaction_id = Transactions.transaction_id
lot_id [ INT ] Transactions_Lots.lot_id = Lots.lot_id

Please write me a SQL statement that answers the following question: Show the ids of the investors who have at least two transactions. [/INST]

Output: SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*)  >=  2;


Input:
[INST] Here is a database schema:
Investors :
investor_id [ INT ] primary_key
Investor_details [ TEXT ]

Lots :
lot_id [ INT ] primary_key
investor_id [ INT ] Lots.investor_id = Investors.investor_id
lot_details [ TEXT ]

Ref_Transaction_Types :
transaction_type_code [ TEXT ] primary_key
transaction_type_description [ TEXT ]

Transactions :
transaction_id [ INT ] primary_key
investor_id [ INT ] Transactions.investor_id = Investors.investor_id
transaction_type_code [ TEXT ] Transactions.transaction_type_code = Ref_Transaction_Types.transaction_type_code
date_of_transaction [ TEXT ]
amount_of_transaction [ INT ]
share_count [ TEXT ]
other_details [ TEXT ]

Sales :
sales_transaction_id [ INT ] primary_key Sales.sales_transaction_id = Transactions.transaction_id
sales_details [ TEXT ]

Purchases :
purchase_transaction_id [ INT ] Purchases.purchase_transaction_id = Transactions.transaction_id
purchase_details [ TEXT ]

Transactions_Lots :
transaction_id [ INT ] Transactions_Lots.transaction_id = Transactions.transaction_id
lot_id [ INT ] Transactions_Lots.lot_id = Lots.lot_id

Please write me a SQL statement that answers the following question: Show the ids and details of the investors who have at least two transactions with type code "SALE". [/INST]

Output: SELECT T2.investor_id ,  T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id WHERE T2.transaction_type_code  =  "SALE" GROUP BY T2.investor_id HAVING COUNT(*)  >=  2;


Input:
[INST] Here is a database schema:
Investors :
investor_id [ INT ] primary_key
Investor_details [ TEXT ]

Lots :
lot_id [ INT ] primary_key
investor_id [ INT ] Lots.investor_id = Investors.investor_id
lot_details [ TEXT ]

Ref_Transaction_Types :
transaction_type_code [ TEXT ] primary_key
transaction_type_description [ TEXT ]

Transactions :
transaction_id [ INT ] primary_key
investor_id [ INT ] Transactions.investor_id = Investors.investor_id
transaction_type_code [ TEXT ] Transactions.transaction_type_code = Ref_Transaction_Types.transaction_type_code
date_of_transaction [ TEXT ]
amount_of_transaction [ INT ]
share_count [ TEXT ]
other_details [ TEXT ]

Sales :
sales_transaction_id [ INT ] primary_key Sales.sales_transaction_id = Transactions.transaction_id
sales_details [ TEXT ]

Purchases :
purchase_transaction_id [ INT ] Purchases.purchase_transaction_id = Transactions.transaction_id
purchase_details [ TEXT ]

Transactions_Lots :
transaction_id [ INT ] Transactions_Lots.transaction_id = Transactions.transaction_id
lot_id [ INT ] Transactions_Lots.lot_id = Lots.lot_id

Please write me a SQL statement that answers the following question: What are the dates of transactions with at least 100 share count or amount bigger than 100? [/INST]

Output: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count  >=  100 OR amount_of_transaction  >=  100;


Input:
[INST] Here is a database schema:
Investors :
investor_id [ INT ] primary_key
Investor_details [ TEXT ]

Lots :
lot_id [ INT ] primary_key
investor_id [ INT ] Lots.investor_id = Investors.investor_id
lot_details [ TEXT ]

Ref_Transaction_Types :
transaction_type_code [ TEXT ] primary_key
transaction_type_description [ TEXT ]

Transactions :
transaction_id [ INT ] primary_key
investor_id [ INT ] Transactions.investor_id = Investors.investor_id
transaction_type_code [ TEXT ] Transactions.transaction_type_code = Ref_Transaction_Types.transaction_type_code
date_of_transaction [ TEXT ]
amount_of_transaction [ INT ]
share_count [ TEXT ]
other_details [ TEXT ]

Sales :
sales_transaction_id [ INT ] primary_key Sales.sales_transaction_id = Transactions.transaction_id
sales_details [ TEXT ]

Purchases :
purchase_transaction_id [ INT ] Purchases.purchase_transaction_id = Transactions.transaction_id
purchase_details [ TEXT ]

Transactions_Lots :
transaction_id [ INT ] Transactions_Lots.transaction_id = Transactions.transaction_id
lot_id [ INT ] Transactions_Lots.lot_id = Lots.lot_id

Please write me a SQL statement that answers the following question: What are the details of all sales and purchases? [/INST]

Output: SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases;


Input:
[INST] Here is a database schema:
Investors :
investor_id [ INT ] primary_key
Investor_details [ TEXT ]

Lots :
lot_id [ INT ] primary_key
investor_id [ INT ] Lots.investor_id = Investors.investor_id
lot_details [ TEXT ]

Ref_Transaction_Types :
transaction_type_code [ TEXT ] primary_key
transaction_type_description [ TEXT ]

Transactions :
transaction_id [ INT ] primary_key
investor_id [ INT ] Transactions.investor_id = Investors.investor_id
transaction_type_code [ TEXT ] Transactions.transaction_type_code = Ref_Transaction_Types.transaction_type_code
date_of_transaction [ TEXT ]
amount_of_transaction [ INT ]
share_count [ TEXT ]
other_details [ TEXT ]

Sales :
sales_transaction_id [ INT ] primary_key Sales.sales_transaction_id = Transactions.transaction_id
sales_details [ TEXT ]

Purchases :
purchase_transaction_id [ INT ] Purchases.purchase_transaction_id = Transactions.transaction_id
purchase_details [ TEXT ]

Transactions_Lots :
transaction_id [ INT ] Transactions_Lots.transaction_id = Transactions.transaction_id
lot_id [ INT ] Transactions_Lots.lot_id = Lots.lot_id

Please write me a SQL statement that answers the following question: What are the details of the lots which are not used in any transactions? [/INST]

Output: SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id  =  T2.lot_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: How many available hotels are there in total? [/INST]

Output: SELECT count(*) FROM HOTELS;


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 total number of available hotels. [/INST]

Output: SELECT count(*) FROM HOTELS;


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 price ranges of hotels? [/INST]

Output: SELECT price_range FROM HOTELS;


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 price ranges for all the hotels. [/INST]

Output: SELECT price_range FROM HOTELS;


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 all distinct location names. [/INST]

Output: SELECT DISTINCT Location_Name FROM LOCATIONS;


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 distinct location names? [/INST]

Output: SELECT DISTINCT Location_Name FROM LOCATIONS;


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 names and details of all the staff members. [/INST]

Output: SELECT Name ,  Other_Details FROM Staff;


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 and detail of each staff member? [/INST]

Output: SELECT Name ,  Other_Details FROM Staff;


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 details of all visitors. [/INST]

Output: SELECT Tourist_Details FROM VISITORS;


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 detail of each visitor? [/INST]

Output: SELECT Tourist_Details FROM VISITORS;


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 price ranges of hotels with 5 star ratings. [/INST]

Output: SELECT price_range FROM HOTELS WHERE star_rating_code  =  "5";


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 price ranges of five star hotels? [/INST]

Output: SELECT price_range FROM HOTELS WHERE star_rating_code  =  "5";


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 range of hotels that have 5 star ratings and allow pets. [/INST]

Output: SELECT avg(price_range) FROM HOTELS WHERE star_rating_code  =  "5" AND pets_allowed_yn  =  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: What is the average price range of five star hotels that allow pets? [/INST]

Output: SELECT avg(price_range) FROM HOTELS WHERE star_rating_code  =  "5" AND pets_allowed_yn  =  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: What is the address of the location "UK Gallery"? [/INST]

Output: SELECT Address FROM LOCATIONS WHERE Location_Name  =  "UK Gallery";


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 address of the location named "UK Gallery". [/INST]

Output: SELECT Address FROM LOCATIONS WHERE Location_Name  =  "UK Gallery";


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 detail of the location UK Gallery? [/INST]

Output: SELECT Other_Details FROM LOCATIONS WHERE Location_Name  =  "UK Gallery";


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: Return the detail of the location named "UK Gallery". [/INST]

Output: SELECT Other_Details FROM LOCATIONS WHERE Location_Name  =  "UK Gallery";


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 location names contain the word "film"? [/INST]

Output: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%";


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 all the locations whose names contain the word "film". [/INST]

Output: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%";


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: How many distinct names are associated with all the photos? [/INST]

Output: SELECT count(DISTINCT Name) FROM PHOTOS;


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: Count the number of distinct names associated with the photos. [/INST]

Output: SELECT count(DISTINCT Name) FROM PHOTOS;


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 distinct visit dates? [/INST]

Output: SELECT DISTINCT Visit_Date FROM VISITS;


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 all the distinct visit dates. [/INST]

Output: SELECT DISTINCT Visit_Date FROM VISITS;


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 that can be accessed by bus? [/INST]

Output: SELECT Name FROM TOURIST_ATTRACTIONS WHERE 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: Which tourist attractions can we get to by bus? Tell me the names of the attractions. [/INST]

Output: SELECT Name FROM TOURIST_ATTRACTIONS WHERE 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 names and opening hours of the tourist attractions that can be accessed by bus or walk? [/INST]

Output: SELECT Name ,  Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus" OR 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 names and opening hours of the tourist attractions that we get to by bus or walk. [/INST]

Output: SELECT Name ,  Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus" OR 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 are the star rating descriptions of the hotels with price above 10000? [/INST]

Output: SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code  =  T2.star_rating_code WHERE T1.price_range  >  10000;


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: Give me the star rating descriptions of the hotels that cost more than 10000. [/INST]

Output: SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code  =  T2.star_rating_code WHERE T1.price_range  >  10000;


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 opening hours of the museums? [/INST]

Output: SELECT T1.Museum_Details ,  T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_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: Give me the detail and opening hour for each museum. [/INST]

Output: SELECT T1.Museum_Details ,  T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID  =  T2.Tourist_Attraction_ID;