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

Convert text to sql: Find the white grape used to produce wines with scores above 90. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct grapes.grape from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White' and wine.score > 90

### Instruction:

Convert text to sql: What are the wines that have prices higher than 50 and made of Red color grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red' and wine.price > 50

### Instruction:

Convert text to sql: What are the names of wines made from red grapes and with prices above 50? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red' and wine.price > 50

### Instruction:

Convert text to sql: What are the wines that have prices lower than 50 and have appelations in Monterey county? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Monterey' and wine.price < 50

### Instruction:

Convert text to sql: Give the neames of wines with prices below 50 and with appelations in Monterey county. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Monterey' and wine.price < 50

### Instruction:

Convert text to sql: What are the numbers of wines for different grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select count ( * ) , grape from wine group by grape
### Instruction:

Convert text to sql: How many wines are there for each grape? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select count ( * ) , grape from wine group by grape

### Instruction:

Convert text to sql: What are the average prices of wines for different years? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select avg ( price ) , year from wine group by year

### Instruction:

Convert text to sql: What is the average prices of wines for each each? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select avg ( price ) , year from wine group by year

### Instruction:

Convert text to sql: Find the distinct names of all wines that have prices higher than some wines from John Anthony winery. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine where price > ( select min ( price ) from wine where winery = 'John Anthony' )

### Instruction:

Convert text to sql: What are the distinct names of wines with prices higher than any wine from John Anthony winery. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine where price > ( select min ( price ) from wine where winery = 'John Anthony' )

### Instruction:

Convert text to sql: List the names of all distinct wines in alphabetical order. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine order by name asc

### Instruction:

Convert text to sql: What are the names of wines, sorted in alphabetical order? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine order by name asc
### Instruction:

Convert text to sql: List the names of all distinct wines ordered by price. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine order by price asc

### Instruction:

Convert text to sql: What are the names of wines, sorted by price ascending? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine order by price asc

### Instruction:

Convert text to sql: What is the area of the appelation that produces the highest number of wines before the year of 2010? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select appellations.area from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having wine.year < 2010 order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What is the area for the appelation which produced the most wines prior to 2010? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select appellations.area from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having wine.year < 2010 order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What is the color of the grape whose wine products has the highest average price? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select grapes.color from grapes join wine on grapes.grape = wine.grape group by wine.grape order by avg ( price ) desc limit 1

### Instruction:

Convert text to sql: Give the color of the grape whose wine products have the highest average price? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select grapes.color from grapes join wine on grapes.grape = wine.grape group by wine.grape order by avg ( price ) desc limit 1
### Instruction:

Convert text to sql: Find the distinct names of wines produced before the year of 2000 or after the year of 2010. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine where year < 2000 or year > 2010

### Instruction:

Convert text to sql: Give the distinct names of wines made before 2000 or after 2010. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct name from wine where year < 2000 or year > 2010

### Instruction:

Convert text to sql: Find the distinct winery of wines having price between 50 and 100. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct winery from wine where price between 50 and 100

### Instruction:

Convert text to sql: What are the distinct wineries which produce wines costing between 50 and 100? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select distinct winery from wine where price between 50 and 100

### Instruction:

Convert text to sql: What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select avg ( price ) , avg ( cases ) from wine where year = 2009 and grape = 'Zinfandel'

### Instruction:

Convert text to sql: Give the average price and case of wines made from Zinfandel grapes in the year 2009. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select avg ( price ) , avg ( cases ) from wine where year = 2009 and grape = 'Zinfandel'
### Instruction:

Convert text to sql: What are the maximum price and score of wines produced by St. Helena appelation? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select max ( price ) , max ( score ) from wine where appelation = 'St. Helena'

### Instruction:

Convert text to sql: Give the maximum price and score for wines produced in the appelation St. Helena. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select max ( price ) , max ( score ) from wine where appelation = 'St. Helena'

### Instruction:

Convert text to sql: What are the maximum price and score of wines in each year? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select max ( price ) , max ( score ) , year from wine group by year

### Instruction:

Convert text to sql: What are the maximum price and score of wines for each year? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select max ( price ) , max ( score ) , year from wine group by year

### Instruction:

Convert text to sql: What are the average price and score of wines grouped by appelation? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select avg ( price ) , avg ( score ) , appelation from wine group by appelation

### Instruction:

Convert text to sql: What are the average price and score of wines for each appelation? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select avg ( price ) , avg ( score ) , appelation from wine group by appelation
### Instruction:

Convert text to sql: Find the wineries that have at least four wines. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select winery from wine group by winery having count ( * ) >= 4

### Instruction:

Convert text to sql: Which wineries produce at least four wines? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select winery from wine group by winery having count ( * ) >= 4

### Instruction:

Convert text to sql: Find the country of all appelations who have at most three wines. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select appellations.county from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having count ( * ) <= 3

### Instruction:

Convert text to sql: What are the countries for appelations with at most 3 wines? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select appellations.county from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having count ( * ) <= 3

### Instruction:

Convert text to sql: What are the names of wines whose production year are before the year of all wines by Brander winery? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select name from wine where year < ( select min ( year ) from wine where winery = 'Brander' )

### Instruction:

Convert text to sql: What are the names of wines produced before any wine from the Brander winery? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select name from wine where year < ( select min ( year ) from wine where winery = 'Brander' )
### Instruction:

Convert text to sql: What are the names of wines that are more expensive then all wines made in the year 2006? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select name from wine where price > ( select max ( price ) from wine where year = 2006 )

### Instruction:

Convert text to sql: Give the names of wines with prices above any wine produced in 2006. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select name from wine where price > ( select max ( price ) from wine where year = 2006 )

### Instruction:

Convert text to sql: Find the top 3 wineries with the greatest number of wines made of white color grapes. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select wine.winery from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White' group by wine.winery order by count ( * ) desc limit 3

### Instruction:

Convert text to sql: Which 3 wineries produce the most wines made from white grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select wine.winery from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White' group by wine.winery order by count ( * ) desc limit 3

### Instruction:

Convert text to sql: List the grape, winery and year of the wines whose price is bigger than 100 ordered by year. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select grape , winery , year from wine where price > 100 order by year asc

### Instruction:

Convert text to sql: What are the grapes, wineries and years for wines with price higher than 100, sorted by year? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select grape , winery , year from wine where price > 100 order by year asc
### Instruction:

Convert text to sql: List the grape, appelation and name of wines whose score is higher than 93 ordered by Name. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select grape , appelation , name from wine where score > 93 order by name asc

### Instruction:

Convert text to sql: What are the grapes, appelations, and wines with scores above 93, sorted by Name? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select grape , appelation , name from wine where score > 93 order by name asc

### Instruction:

Convert text to sql: Find the appelations that produce wines after the year of 2008 but not in Central Coast area. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select appelation from wine where year > 2008 except select appelation from appellations where area = 'Central Coast'

### Instruction:

Convert text to sql: What are the appelations for wines produced after 2008 but not in the Central Coast area? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select appelation from wine where year > 2008 except select appelation from appellations where area = 'Central Coast'

### Instruction:

Convert text to sql: Find the average price of wines that are not produced from Sonoma county. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | 

### Response:

select avg ( price ) from wine where appelation not in ( select appellations.appelation from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Sonoma' )