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

Convert text to sql: How many budget types do we have? | 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 count ( * ) from ref_budget_codes

### Instruction:

Convert text to sql: Count the number of budget codes. | 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 count ( * ) from ref_budget_codes

### Instruction:

Convert text to sql: List all budget type codes and descriptions. | 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 budget_type_code , budget_type_description from ref_budget_codes
### Instruction:

Convert text to sql: What are the type codes and descriptions of each budget type? | 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 budget_type_code , budget_type_description from ref_budget_codes

### Instruction:

Convert text to sql: What is the description for the budget type with code ORG? | 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 budget_type_description from ref_budget_codes where budget_type_code = 'ORG'
### Instruction:

Convert text to sql: Return the description of the budget type that has the code ORG. | 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 budget_type_description from ref_budget_codes where budget_type_code = 'ORG'

### Instruction:

Convert text to sql: How many documents have 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 count ( * ) from documents_with_expenses

### Instruction:

Convert text to sql: Count the number of documents with 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 count ( * ) from documents_with_expenses
### Instruction:

Convert text to sql: What are the document ids for the budget type code '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 document_id from documents_with_expenses where budget_type_code = 'SF'

### Instruction:

Convert text to sql: Give the ids of documents with expenses that have the budget code '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 document_id from documents_with_expenses where budget_type_code = 'SF'
### Instruction:

Convert text to sql: Show the budget type code and description and the corresponding document id. | 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 ref_budget_codes.budget_type_code , ref_budget_codes.budget_type_description , documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code

### Instruction:

Convert text to sql: Return the budget type codes, budget type descriptions and document ids for documents with 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 ref_budget_codes.budget_type_code , ref_budget_codes.budget_type_description , documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code
### Instruction:

Convert text to sql: Show ids for all documents with budget types described as 'Government'. | 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 documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code where ref_budget_codes.budget_type_description = 'Government'

### Instruction:

Convert text to sql: Give the ids for documents that have the budget description 'Government'. | 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 documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code where ref_budget_codes.budget_type_description = 'Government'
### Instruction:

Convert text to sql: Show budget type codes and the number of documents in each budget type. | 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 budget_type_code , count ( * ) from documents_with_expenses group by budget_type_code

### Instruction:

Convert text to sql: What are the different budget type codes, and how many documents are there for each? | 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 budget_type_code , count ( * ) from documents_with_expenses group by budget_type_code
### Instruction:

Convert text to sql: What is the budget type code with most number of documents. | 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 budget_type_code from documents_with_expenses group by budget_type_code order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Give the budget type code that is most common among documents with 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 budget_type_code from documents_with_expenses group by budget_type_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the ids of documents which don't have expense budgets? | 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 document_id from documents except select document_id from documents_with_expenses

### Instruction:

Convert text to sql: Return the ids of documents that do not have 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 document_id from documents except select document_id from documents_with_expenses
### Instruction:

Convert text to sql: Show ids for all documents in type CV without expense budgets. | 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 document_id from documents where document_type_code = 'CV' except select document_id from documents_with_expenses

### Instruction:

Convert text to sql: What are the ids of documents with the type code CV that do not have 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 document_id from documents where document_type_code = 'CV' except select document_id from documents_with_expenses