db_id
stringlengths
4
31
text
stringlengths
398
4.9k
cre_Docs_and_Epenses
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 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 count ( _ ) from _ | select count ( * ) from documents
cre_Docs_and_Epenses
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 document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'. | 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 _ | select document_type_code , document_name , document_description from documents where document_name = 'Noel CV' or document_name = 'King Book'
cre_Docs_and_Epenses
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 type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'? | 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 _ | select document_type_code , document_name , document_description from documents where document_name = 'Noel CV' or document_name = 'King Book'
cre_Docs_and_Epenses
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: Show the ids and names of all 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 _ from _ | select document_id , document_name from documents
cre_Docs_and_Epenses
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 ids and names for each of the 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 _ from _ | select document_id , document_name from documents
cre_Docs_and_Epenses
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 names and ids of all documents with document type code BK. | 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 _ | select document_name , document_id from documents where document_type_code = 'BK'
cre_Docs_and_Epenses
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 ids of documents that have the type code BK? | 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 _ | select document_name , document_id from documents where document_type_code = 'BK'
cre_Docs_and_Epenses
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 documents are with document type code BK for each product 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 count ( _ ) , _ from _ where _ group by _ | select count ( * ) , project_id from documents where document_type_code = 'BK' group by project_id
cre_Docs_and_Epenses
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 documents with the type code BK that correspond to each product 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 count ( _ ) , _ from _ where _ group by _ | select count ( * ) , project_id from documents where document_type_code = 'BK' group by project_id
cre_Docs_and_Epenses
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: Show the document name and the document date for all documents on project with details 'Graph Database project'. | 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 _ | select document_name , document_date from documents join projects on documents.project_id = projects.project_id where projects.project_details = 'Graph Database project'
cre_Docs_and_Epenses
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 dates for documents corresponding to project that has the details 'Graph Database project'? | 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 _ | select document_name , document_date from documents join projects on documents.project_id = projects.project_id where projects.project_details = 'Graph Database project'
cre_Docs_and_Epenses
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: Show project ids and the number of documents in each project. | 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 _ group by _ | select project_id , count ( * ) from documents group by project_id
cre_Docs_and_Epenses
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 documents correspond with each project 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 _ , count ( _ ) from _ group by _ | select project_id , count ( * ) from documents group by project_id
cre_Docs_and_Epenses
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 id of the project with least 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 _ from _ group by _ order by count ( _ ) asc limit _ | select project_id from documents group by project_id order by count ( * ) asc limit 1
cre_Docs_and_Epenses
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 id of the project that has the fewest corresponding 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 _ from _ group by _ order by count ( _ ) asc limit _ | select project_id from documents group by project_id order by count ( * ) asc limit 1
cre_Docs_and_Epenses
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: Show the ids for projects with at least 2 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 _ from _ group by _ having count ( _ ) >= _ | select project_id from documents group by project_id having count ( * ) >= 2
cre_Docs_and_Epenses
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 project ids of projects that have 2 or more corresponding 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 _ from _ group by _ having count ( _ ) >= _ | select project_id from documents group by project_id having count ( * ) >= 2
cre_Docs_and_Epenses
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 document type codes and the number of documents in each code. | 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 _ group by _ | select document_type_code , count ( * ) from documents group by document_type_code
cre_Docs_and_Epenses
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 documents are there of each 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 _ , count ( _ ) from _ group by _ | select document_type_code , count ( * ) from documents group by document_type_code
cre_Docs_and_Epenses
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 document 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 _ from _ group by _ order by count ( _ ) desc limit _ | select document_type_code from documents group by document_type_code order by count ( * ) desc limit 1
cre_Docs_and_Epenses
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 code of the document type that is most common. | 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 _ group by _ order by count ( _ ) desc limit _ | select document_type_code from documents group by document_type_code order by count ( * ) desc limit 1
cre_Docs_and_Epenses
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: Show the document type code with fewer than 3 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 _ from _ group by _ having count ( _ ) < _ | select document_type_code from documents group by document_type_code having count ( * ) < 3
cre_Docs_and_Epenses
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 codes corresponding to document types for which there are less than 3 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 _ from _ group by _ having count ( _ ) < _ | select document_type_code from documents group by document_type_code having count ( * ) < 3
cre_Docs_and_Epenses
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: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'. | 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 _ | select statements.statement_details , documents.document_name from statements join documents on statements.statement_id = documents.document_id where statements.statement_details = 'Private Project'
cre_Docs_and_Epenses
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 details for statements with the details 'Private Project', and what are the names of the corresponding 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 _ from _ where _ | select statements.statement_details , documents.document_name from statements join documents on statements.statement_id = documents.document_id where statements.statement_details = 'Private Project'
cre_Docs_and_Epenses
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: Show all document type codes, document type names, document type 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 _ from _ | select document_type_code , document_type_name , document_type_description from ref_document_types
cre_Docs_and_Epenses
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 codes, names, and descriptions of the different document types? | 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 _ | select document_type_code , document_type_name , document_type_description from ref_document_types
cre_Docs_and_Epenses
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 document type description for document type named Film? | 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 _ | select document_type_description from ref_document_types where document_type_name = 'Film'
cre_Docs_and_Epenses
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 description of the document type name 'Film'. | 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 _ | select document_type_description from ref_document_types where document_type_name = 'Film'
cre_Docs_and_Epenses
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 document type name and the document type description and creation date for all the 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 _ from _ | select ref_document_types.document_type_name , ref_document_types.document_type_description , documents.document_date from ref_document_types join documents on ref_document_types.document_type_code = documents.document_type_code
cre_Docs_and_Epenses
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 type name, type description, and date of creation for each document. | 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 _ | select ref_document_types.document_type_name , ref_document_types.document_type_description , documents.document_date from ref_document_types join documents on ref_document_types.document_type_code = documents.document_type_code
cre_Docs_and_Epenses
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: Show the number of projects. | 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 _ | select count ( * ) from projects
cre_Docs_and_Epenses
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 projects are there? | 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 _ | select count ( * ) from projects
cre_Docs_and_Epenses
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 ids and details for all projects. | 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 _ | select project_id , project_details from projects
cre_Docs_and_Epenses
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 ids and details for each project? | 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 _ | select project_id , project_details from projects
cre_Docs_and_Epenses
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 project id and detail for the project with at least two 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 _ from _ group by _ having count ( _ ) > _ | select projects.project_id , projects.project_details from projects join documents on projects.project_id = documents.project_id group by projects.project_id having count ( * ) > 2
cre_Docs_and_Epenses
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 ids and details corresponding to projects for which there are more than two 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 _ from _ group by _ having count ( _ ) > _ | select projects.project_id , projects.project_details from projects join documents on projects.project_id = documents.project_id group by projects.project_id having count ( * ) > 2
cre_Docs_and_Epenses
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 project detail for the project with document "King Book"? | 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 _ | select projects.project_details from projects join documents on projects.project_id = documents.project_id where documents.document_name = 'King Book'
cre_Docs_and_Epenses
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 details of the project with the document name 'King Book'. | 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 _ | select projects.project_details from projects join documents on projects.project_id = documents.project_id where documents.document_name = 'King Book'
cre_Docs_and_Epenses
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 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 _ | select count ( * ) from ref_budget_codes
cre_Docs_and_Epenses
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 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 _ | select count ( * ) from ref_budget_codes
cre_Docs_and_Epenses
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 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 _ from _ | select budget_type_code , budget_type_description from ref_budget_codes
cre_Docs_and_Epenses
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 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 _ from _ | select budget_type_code , budget_type_description from ref_budget_codes
cre_Docs_and_Epenses
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 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 _ from _ where _ | select budget_type_description from ref_budget_codes where budget_type_code = 'ORG'
cre_Docs_and_Epenses
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 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 _ from _ where _ | select budget_type_description from ref_budget_codes where budget_type_code = 'ORG'
cre_Docs_and_Epenses
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 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 _ | select count ( * ) from documents_with_expenses
cre_Docs_and_Epenses
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 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 _ | select count ( * ) from documents_with_expenses
cre_Docs_and_Epenses
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 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 _ from _ where _ | select document_id from documents_with_expenses where budget_type_code = 'SF'
cre_Docs_and_Epenses
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 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 _ from _ where _ | select document_id from documents_with_expenses where budget_type_code = 'SF'
cre_Docs_and_Epenses
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: 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 _ from _ | 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
cre_Docs_and_Epenses
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 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 _ from _ | 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
cre_Docs_and_Epenses
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: 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 _ from _ where _ | 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'
cre_Docs_and_Epenses
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 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 _ from _ where _ | 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'
cre_Docs_and_Epenses
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: 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 _ , count ( _ ) from _ group by _ | select budget_type_code , count ( * ) from documents_with_expenses group by budget_type_code
cre_Docs_and_Epenses
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 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 _ , count ( _ ) from _ group by _ | select budget_type_code , count ( * ) from documents_with_expenses group by budget_type_code
cre_Docs_and_Epenses
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 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 _ from _ group by _ order by count ( _ ) desc limit _ | select budget_type_code from documents_with_expenses group by budget_type_code order by count ( * ) desc limit 1
cre_Docs_and_Epenses
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 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 _ from _ group by _ order by count ( _ ) desc limit _ | select budget_type_code from documents_with_expenses group by budget_type_code order by count ( * ) desc limit 1
cre_Docs_and_Epenses
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 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 _ from _ except select _ from _ | select document_id from documents except select document_id from documents_with_expenses
cre_Docs_and_Epenses
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 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 _ from _ except select _ from _ | select document_id from documents except select document_id from documents_with_expenses
cre_Docs_and_Epenses
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: 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 _ from _ where _ except select _ from _ | select document_id from documents where document_type_code = 'CV' except select document_id from documents_with_expenses
cre_Docs_and_Epenses
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 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 _ from _ where _ except select _ from _ | select document_id from documents where document_type_code = 'CV' except select document_id from documents_with_expenses
cre_Docs_and_Epenses
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 ids of documents with letter 's' in the name with any 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 _ from _ where _ like _ | select documents.document_id from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents.document_name like '%s%'
cre_Docs_and_Epenses
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 ids of documents that have expenses and contain the letter s in their names. | 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 _ like _ | select documents.document_id from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents.document_name like '%s%'
cre_Docs_and_Epenses
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 documents do not have any expense? | 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 _ where _ not in ( select _ from _ ) | select count ( * ) from documents where document_id not in ( select document_id from documents_with_expenses )
cre_Docs_and_Epenses
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 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 count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from documents where document_id not in ( select document_id from documents_with_expenses )
cre_Docs_and_Epenses
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 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'
cre_Docs_and_Epenses
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 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'
cre_Docs_and_Epenses
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 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%'
cre_Docs_and_Epenses
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 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%'
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 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
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 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
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 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
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 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
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 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
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: 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
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 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
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 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
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 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
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 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
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 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
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 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
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 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 )
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 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 )
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 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
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 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
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 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%'
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 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%'
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 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'
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 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'
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 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
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 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
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 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'
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 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'
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 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
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 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
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 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
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 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
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 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
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 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
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 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