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

Convert text to sql: What are the dates for the documents with both 'GV' type and 'SF' type expenses? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'GV' intersect select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'SF'
### Instruction:

Convert text to sql: Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'GV' intersect select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'SF'
### Instruction:

Convert text to sql: What are the account details with the largest value or with value having char '5' in it? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | 

### Response:

select max ( _ ) from _ union select _ from _ where _ like _ | select max ( account_details ) from accounts union select account_details from accounts where account_details like '%5%'
### Instruction:

Convert text to sql: Return the account details with the greatest value, as well as those that include the character 5. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | 

### Response:

select max ( _ ) from _ union select _ from _ where _ like _ | select max ( account_details ) from accounts union select account_details from accounts where account_details like '%5%'
### Instruction:

Convert text to sql: Find the total number of scientists. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( _ ) from _ | select count ( * ) from scientists
### Instruction:

Convert text to sql: How many scientists are there? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( _ ) from _ | select count ( * ) from scientists
### Instruction:

Convert text to sql: Find the total hours of all projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select sum ( _ ) from _ | select sum ( hours ) from projects
### Instruction:

Convert text to sql: What is the total number of hours for all projects? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select sum ( _ ) from _ | select sum ( hours ) from projects
### Instruction:

Convert text to sql: How many different scientists 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 count ( distinct _ ) from _ | select count ( distinct scientist ) from assignedto
### Instruction:

Convert text to sql: Count the number of different scientists 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 ( distinct _ ) from _ | select count ( distinct scientist ) from assignedto
### Instruction:

Convert text to sql: Find the number of distinct projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct name ) from projects
### Instruction:

Convert text to sql: How many different projects are there? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct name ) from projects
### Instruction:

Convert text to sql: Find the average hours of all projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select avg ( _ ) from _ | select avg ( hours ) from projects
### Instruction:

Convert text to sql: What is the average hours across all projects? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select avg ( _ ) from _ | select avg ( hours ) from projects
### Instruction:

Convert text to sql: Find the name of project that continues for the longest time. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ order by _ desc limit _ | select name from projects order by hours desc limit 1
### Instruction:

Convert text to sql: What is the name of 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 _ from _ order by _ desc limit _ | select name from projects order by hours desc limit 1
### Instruction:

Convert text to sql: List the name of all projects that are operated longer than the average working hours of all projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ > ( select avg ( _ ) from _ ) | select name from projects where hours > ( select avg ( hours ) from projects )
### Instruction:

Convert text to sql: What are the names of projects that have taken longer than the average number of hours for all projects? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ > ( select avg ( _ ) from _ ) | select name from projects where hours > ( select avg ( hours ) from projects )
### Instruction:

Convert text to sql: Find the name and hours of project that has the most number of scientists. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select projects.name , projects.hours from projects join assignedto on projects.code = assignedto.project group by assignedto.project order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the name and hours for the project which has the most scientists assigned to it? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select projects.name , projects.hours from projects join assignedto on projects.code = assignedto.project group by assignedto.project order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the name of the project for which a scientist whose name contains 'Smith' is assigned to. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ like _ | select projects.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name like '%Smith%'
### Instruction:

Convert text to sql: What is the name of the project that has a scientist assigned to it whose name contains 'Smith'? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ like _ | select projects.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name like '%Smith%'
### Instruction:

Convert text to sql: Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select sum ( _ ) from _ where _ | select sum ( projects.hours ) from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name = 'Michael Rogers' or scientists.name = 'Carol Smith'
### Instruction:

Convert text to sql: What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select sum ( _ ) from _ where _ | select sum ( projects.hours ) from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name = 'Michael Rogers' or scientists.name = 'Carol Smith'
### Instruction:

Convert text to sql: Find the name of projects that require between 100 and 300 hours of work. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ between _ and _ | select name from projects where hours between 100 and 300
### Instruction:

Convert text to sql: What are the names of projects that require between 100 and 300 hours? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ between _ and _ | select name from projects where hours between 100 and 300
### Instruction:

Convert text to sql: Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'Matter of Time' intersect select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'A Puzzling Parallax'
### Instruction:

Convert text to sql: What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'Matter of Time' intersect select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'A Puzzling Parallax'
### Instruction:

Convert text to sql: List the names of all scientists sorted in alphabetical order. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ order by _ asc | select name from scientists order by name asc
### Instruction:

Convert text to sql: What are the names of all the scientists in alphabetical order? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select _ from _ order by _ asc | select name from scientists order by name asc
### Instruction:

Convert text to sql: Find the number of scientists involved for each project name. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , projects.name from projects join assignedto on projects.code = assignedto.project group by projects.name
### Instruction:

Convert text to sql: What are the naems of all the projects, and how many scientists were assigned to each of them? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , projects.name from projects join assignedto on projects.code = assignedto.project group by projects.name
### Instruction:

Convert text to sql: Find the number of scientists involved for the projects that require more than 300 hours. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | 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: 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 ( _ ) , _ from _ where _ group by _ | 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 ( _ ) , _ from _ group by _ | 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 ( _ ) , _ from _ group by _ | 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 _ from _ where _ = ( select max ( _ ) from _ ) | 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 _ from _ where _ = ( select max ( _ ) from _ ) | 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 _ from _ | 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 _ from _ | 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 _ from _ where _ not in ( select _ from _ ) | 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 _ from _ where _ not in ( select _ from _ ) | 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 _ from _ where _ not in ( select _ from _ ) | 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 _ from _ where _ not in ( select _ from _ ) | 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 _ where _ not in ( select _ from _ ) | select count ( * ) from scientists where ssn not in ( select scientist from assignedto )