db_id
stringlengths
4
31
text
stringlengths
370
4.84k
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the scientists, and how many projects are each of them working on? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select count ( * ) , scientists.name from scientists join assignedto on scientists.ssn = assignedto.scientist group by scientists.name
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the SSN and name of scientists who are assigned to the project with the longest hours. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select scientists.ssn , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the SSN and names of scientists working on the project with the most hours? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select scientists.ssn , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name of scientists who are assigned to some project. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select scientists.name from assignedto join scientists on assignedto.scientist = scientists.ssn
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of scientists who are assigned to any project? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select scientists.name from assignedto join scientists on assignedto.scientist = scientists.ssn
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Select the project names which are not assigned yet. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select name from projects where code not in ( select project from assignedto )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of projects that have not been assigned? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select name from projects where code not in ( select project from assignedto )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name of scientists who are not assigned to any project. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select name from scientists where ssn not in ( select scientist from assignedto )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of scientists who have not been assigned a project? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select name from scientists where ssn not in ( select scientist from assignedto )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of scientists who are not assigned to any project. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select count ( * ) from scientists where ssn not in ( select scientist from assignedto )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many scientists do not have any projects assigned to them? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select count ( * ) from scientists where ssn not in ( select scientist from assignedto )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of scientists who are not working on the project with the highest hours. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select name from scientists except select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of scientists who are not working on the project with the most hours? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select name from scientists except select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select scientists.name , projects.name , projects.hours from scientists join assignedto on scientists.ssn = assignedto.scientist join projects on assignedto.project = projects.code order by projects.name asc , scientists.name
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select scientists.name , projects.name , projects.hours from scientists join assignedto on scientists.ssn = assignedto.scientist join projects on assignedto.project = projects.code order by projects.name asc , scientists.name
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select projects.name , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select min ( hours ) from projects )
scientist_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | ### Response: select projects.name , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select min ( hours ) from projects )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the highest rated wine? | 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 order by score asc limit 1
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the name of the wine with the highest score. | 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 order by score asc limit 1
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which winery is the wine that has the highest score from? | 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 order by score asc limit 1
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the winery at which the wine with the highest score was made? | 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 order by score asc limit 1
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of all wines produced in 2008. | 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 = '2008'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all wines produced in 2008? | 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 = '2008'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the grapes and appelations of all 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 grape , appelation from wine
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the grapes and appelations of each wine? | 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 from wine
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names and scores of all 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 name , score from wine
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names and scores of all 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 name , score from wine
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the area and county of all appelations. | 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 area , county from appellations
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the areas and counties for all appelations? | 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 area , county from appellations
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the prices of wines produced 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 price from wine where year < 2010
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the prices of wines produced before 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 price from wine where year < 2010
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of all distinct wines that have scores higher than 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 name from wine where score > 90
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of wines with scores higher than 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 name from wine where score > 90
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of all distinct wines that are made of red color 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 distinct wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of wines made from red 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 distinct wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of all distinct wines that have appellations in North 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 distinct wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'North Coast'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct names of wines that have appellations in the North 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 distinct wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'North Coast'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many wines are produced at Robert Biale 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 count ( * ) from wine where winery = 'Robert Biale'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of wines produced at Robert Biale 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 count ( * ) from wine where winery = 'Robert Biale'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many appelations are in Napa Country? | 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 ( * ) from appellations where county = 'Napa'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of appelations in Napa 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 count ( * ) from appellations where county = 'Napa'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give me the average prices of wines that are produced by appelations in 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 ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Sonoma'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average price of wines produced in appelations in 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 ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Sonoma'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names and scores of wines that are 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.name , wine.score from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the names and scores of 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.name , wine.score from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005. | 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 ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'Central Coast' and wine.year < 2005
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005? | 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 ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'Central Coast' and wine.year < 2005
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the the grape whose white color grapes are used to produce wines with scores higher than 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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' )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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' )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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' )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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' )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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'
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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' )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average price for wines not produced in 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' )
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the county where produces the most number of wines with score higher than 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 appellations.county from appellations join wine on appellations.appelation = wine.appelation where wine.score > 90 group by appellations.county order by count ( * ) desc limit 1
wine_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the county that produces the most wines scoring higher than 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 appellations.county from appellations join wine on appellations.appelation = wine.appelation where wine.score > 90 group by appellations.county order by count ( * ) desc limit 1
train_station
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many train stations are there? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | ### Response: select count ( * ) from station