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

Convert text to sql: What are the names of projects that require more than 300 hours, and how many scientists are assigned to each? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( * ) , projects.name from projects join assignedto on projects.code = assignedto.project where projects.hours > 300 group by projects.name

### Instruction:

Convert text to sql: Find the number of projects which each scientist is working on and scientist's name. | 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

### 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

### 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 )

### 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 )

### 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
### 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

### 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 )

### 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 )

### 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 )

### 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 )

### 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 )

### 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 )
### 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 )

### 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 )

### 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

### 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

### 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 )
### 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 )
### 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

### 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

### 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

### 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

### 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'

### 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'

### 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
### 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

### 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

### 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

### 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

### 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

### 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

### 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
### 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

### 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

### 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'

### 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'

### 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'

### 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'
### 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'

### 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'

### 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'

### 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'

### 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'

### 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'
### 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'

### 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'

### 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

### 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

### 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