richardr1126/spider-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: Find the total population of the top 3 districts with the largest area. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select sum ( city_population ) from district order by city_area desc limit 3

### Instruction:

Convert text to sql: What is the total number of residents for the districts with the 3 largest areas? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select sum ( city_population ) from district order by city_area desc limit 3

### Instruction:

Convert text to sql: Find all types of store and number of them. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select type , count ( * ) from store group by type

### Instruction:

Convert text to sql: For each type of store, how many of them are there? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select type , count ( * ) from store group by type
### Instruction:

Convert text to sql: Find the names of all stores in Khanewal District. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select store.store_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where district.district_name = 'Khanewal District'

### Instruction:

Convert text to sql: What are the names of all the stores located in Khanewal District? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select store.store_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where district.district_name = 'Khanewal District'

### Instruction:

Convert text to sql: Find all the stores in the district with the most population. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select store.store_name from store join store_district on store.store_id = store_district.store_id where district_id = ( select district_id from district order by city_population desc limit 1 )
### Instruction:

Convert text to sql: What are the names of all the stores in the largest district by population? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select store.store_name from store join store_district on store.store_id = store_district.store_id where district_id = ( select district_id from district order by city_population desc limit 1 )

### Instruction:

Convert text to sql: Which city is the headquarter of the store named "Blackville" in? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.store_name = 'Blackville'

### Instruction:

Convert text to sql: What city is the headquarter of the store Blackville? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.store_name = 'Blackville'
### Instruction:

Convert text to sql: Find the number of stores in each city. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select district.headquartered_city , count ( * ) from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city

### Instruction:

Convert text to sql: How many stores are headquarted in each city? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select district.headquartered_city , count ( * ) from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city

### Instruction:

Convert text to sql: Find the city with the most number of stores. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the city with the most number of flagship stores? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What is the average pages per minute color? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select avg ( pages_per_minute_color ) from product

### Instruction:

Convert text to sql: What is the average number of pages per minute color? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select avg ( pages_per_minute_color ) from product

### Instruction:

Convert text to sql: What products are available at store named "Miramichi"? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product.product from product join store_product on product.product_id = store_product.product_id join store on store_product.store_id = store.store_id where store.store_name = 'Miramichi'
### Instruction:

Convert text to sql: What products are sold at the store named Miramichi? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product.product from product join store_product on product.product_id = store_product.product_id join store on store_product.store_id = store.store_id where store.store_name = 'Miramichi'

### Instruction:

Convert text to sql: Find products with max page size as "A4" and pages per minute color smaller than 5. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where max_page_size = 'A4' and pages_per_minute_color < 5

### Instruction:

Convert text to sql: What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where max_page_size = 'A4' and pages_per_minute_color < 5

### Instruction:

Convert text to sql: Find products with max page size as "A4" or pages per minute color smaller than 5. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where max_page_size = 'A4' or pages_per_minute_color < 5
### Instruction:

Convert text to sql: What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where max_page_size = 'A4' or pages_per_minute_color < 5

### Instruction:

Convert text to sql: Find all the product whose name contains the word "Scanner". | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where product like '%Scanner%'

### Instruction:

Convert text to sql: What are all of the products whose name includes the substring "Scanner"? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where product like '%Scanner%'

### Instruction:

Convert text to sql: Find the most prominent max page size among all the products. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select max_page_size from product group by max_page_size order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the most common maximum page size? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select max_page_size from product group by max_page_size order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Find the name of the products that are not using the most frequently-used max page size. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where product != ( select max_page_size from product group by max_page_size order by count ( * ) desc limit 1 )

### Instruction:

Convert text to sql: What are the names of all products that are not the most frequently-used maximum page size? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select product from product where product != ( select max_page_size from product group by max_page_size order by count ( * ) desc limit 1 )

### Instruction:

Convert text to sql: Find the total population of the districts where the area is bigger than the average city area. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | 

### Response:

select sum ( city_population ) from district where city_area > ( select avg ( city_area ) from district )