db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
cre_Docs_and_Epenses
select count(*) from documents
Question: count the number of documents. | Tables: 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, Doc...
count the number of documents.
cre_Docs_and_Epenses
select document_type_code , document_name , document_description from documents where document_name = 'noel cv' or document_name = 'king book'
Question: list the document type code, document name, and document description for the document with name 'noel cv' or name 'king book'. | Tables: Ref_Document_Types -> Document_Type_Code, Document_Type_Name, Document_Type_Description. Ref_Budget_Codes -> Budget_Type_Code, Budget_Type_Description. Projects -> Project_I...
list the document type code, document name, and document description for the document with name 'noel cv' or name 'king book'.
cre_Docs_and_Epenses
select document_type_code , document_name , document_description from documents where document_name = 'noel cv' or document_name = 'king book'
Question: what are the type come, name, and description of the document that has either the name 'noel cv' or 'king book'? | Tables: 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_Det...
what are the type come, name, and description of the document that has either the name 'noel cv' or 'king book'?
cre_Docs_and_Epenses
select document_id , document_name from documents
Question: show the ids and names of all documents. | Tables: 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...
show the ids and names of all documents.
cre_Docs_and_Epenses
select document_id , document_name from documents
Question: what are the ids and names for each of the documents? | Tables: 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...
what are the ids and names for each of the documents?
cre_Docs_and_Epenses
select document_name , document_id from documents where document_type_code = 'bk'
Question: find names and ids of all documents with document type code bk. | Tables: 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_Cod...
find names and ids of all documents with document type code bk.
cre_Docs_and_Epenses
select document_name , document_id from documents where document_type_code = 'bk'
Question: what are the names and ids of documents that have the type code bk? | Tables: 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...
what are the names and ids of documents that have the type code bk?
cre_Docs_and_Epenses
select count(*) , project_id from documents where document_type_code = 'bk' group by project_id
Question: how many documents are with document type code bk for each product id? | Tables: 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_T...
how many documents are with document type code bk for each product id?
cre_Docs_and_Epenses
select count(*) , project_id from documents where document_type_code = 'bk' group by project_id
Question: count the number of documents with the type code bk that correspond to each product id. | Tables: 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 -> Docume...
count the number of documents with the type code bk that correspond to each product id.
cre_Docs_and_Epenses
select document_name , document_date from documents as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'graph database project'
Question: show the document name and the document date for all documents on project with details 'graph database project'. | Tables: 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_Det...
show the document name and the document date for all documents on project with details 'graph database project'.
cre_Docs_and_Epenses
select document_name , document_date from documents as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'graph database project'
Question: what are the names and dates for documents corresponding to project that has the details 'graph database project'? | Tables: 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_D...
what are the names and dates for documents corresponding to project that has the details 'graph database project'?
cre_Docs_and_Epenses
select project_id , count(*) from documents group by project_id
Question: show project ids and the number of documents in each project. | Tables: 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,...
show project ids and the number of documents in each project.
cre_Docs_and_Epenses
select project_id , count(*) from documents group by project_id
Question: how many documents correspond with each project id? | Tables: 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_I...
how many documents correspond with each project id?
cre_Docs_and_Epenses
select project_id from documents group by project_id order by count(*) asc limit 1
Question: what is the id of the project with least number of documents? | Tables: 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,...
what is the id of the project with least number of documents?
cre_Docs_and_Epenses
select project_id from documents group by project_id order by count(*) asc limit 1
Question: return the id of the project that has the fewest corresponding documents. | Tables: 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, Documen...
return the id of the project that has the fewest corresponding documents.
cre_Docs_and_Epenses
select project_id from documents group by project_id having count(*) >= 2
Question: show the ids for projects with at least 2 documents. | Tables: 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_...
show the ids for projects with at least 2 documents.
cre_Docs_and_Epenses
select project_id from documents group by project_id having count(*) >= 2
Question: what are project ids of projects that have 2 or more corresponding documents? | Tables: 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, Doc...
what are project ids of projects that have 2 or more corresponding documents?
cre_Docs_and_Epenses
select document_type_code , count(*) from documents group by document_type_code
Question: list document type codes and the number of documents in each code. | Tables: 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_...
list document type codes and the number of documents in each code.
cre_Docs_and_Epenses
select document_type_code , count(*) from documents group by document_type_code
Question: how many documents are there of each type? | Tables: 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, Docume...
how many documents are there of each type?
cre_Docs_and_Epenses
select document_type_code from documents group by document_type_code order by count(*) desc limit 1
Question: what is the document type code with most number of documents? | Tables: 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,...
what is the document type code with most number of documents?
cre_Docs_and_Epenses
select document_type_code from documents group by document_type_code order by count(*) desc limit 1
Question: return the code of the document type that is most common. | Tables: 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, Pro...
return the code of the document type that is most common.
cre_Docs_and_Epenses
select document_type_code from documents group by document_type_code having count(*) < 3
Question: show the document type code with fewer than 3 documents. | Tables: 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, Proj...
show the document type code with fewer than 3 documents.
cre_Docs_and_Epenses
select document_type_code from documents group by document_type_code having count(*) < 3
Question: what are the codes corresponding to document types for which there are less than 3 documents? | Tables: 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 -> ...
what are the codes corresponding to document types for which there are less than 3 documents?
cre_Docs_and_Epenses
select t1.statement_details , t2.document_name from statements as t1 join documents as t2 on t1.statement_id = t2.document_id where t1.statement_details = 'private project'
Question: show the statement detail and the corresponding document name for the statement with detail 'private project'. | Tables: 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_Detai...
show the statement detail and the corresponding document name for the statement with detail 'private project'.
cre_Docs_and_Epenses
select t1.statement_details , t2.document_name from statements as t1 join documents as t2 on t1.statement_id = t2.document_id where t1.statement_details = 'private project'
Question: what are the details for statements with the details 'private project', and what are the names of the corresponding documents? | Tables: Ref_Document_Types -> Document_Type_Code, Document_Type_Name, Document_Type_Description. Ref_Budget_Codes -> Budget_Type_Code, Budget_Type_Description. Projects -> Project_I...
what are the details for statements with the details 'private project', and what are the names of the corresponding documents?
cre_Docs_and_Epenses
select document_type_code , document_type_name , document_type_description from ref_document_types
Question: show all document type codes, document type names, document type descriptions. | Tables: 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, Do...
show all document type codes, document type names, document type descriptions.
cre_Docs_and_Epenses
select document_type_code , document_type_name , document_type_description from ref_document_types
Question: what are the codes, names, and descriptions of the different document types? | Tables: 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, Docu...
what are the codes, names, and descriptions of the different document types?
cre_Docs_and_Epenses
select document_type_description from ref_document_types where document_type_name = 'film'
Question: what is the document type description for document type named film? | Tables: 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...
what is the document type description for document type named film?
cre_Docs_and_Epenses
select document_type_description from ref_document_types where document_type_name = 'film'
Question: return the description of the document type name 'film'. | Tables: 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, Proj...
return the description of the document type name 'film'.
cre_Docs_and_Epenses
select t1.document_type_name , t1.document_type_description , t2.document_date from ref_document_types as t1 join documents as t2 on t1.document_type_code = t2.document_type_code
Question: what is the document type name and the document type description and creation date for all the documents? | Tables: 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. D...
what is the document type name and the document type description and creation date for all the documents?
cre_Docs_and_Epenses
select t1.document_type_name , t1.document_type_description , t2.document_date from ref_document_types as t1 join documents as t2 on t1.document_type_code = t2.document_type_code
Question: return the type name, type description, and date of creation for each document. | Tables: 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, D...
return the type name, type description, and date of creation for each document.
cre_Docs_and_Epenses
select count(*) from projects
Question: show the number of projects. | Tables: 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, Docum...
show the number of projects.
cre_Docs_and_Epenses
select count(*) from projects
Question: how many projects are there? | Tables: 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, Docum...
how many projects are there?
cre_Docs_and_Epenses
select project_id , project_details from projects
Question: list ids and details for all projects. | Tables: 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_D...
list ids and details for all projects.
cre_Docs_and_Epenses
select project_id , project_details from projects
Question: what are the ids and details for each project? | Tables: 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, Do...
what are the ids and details for each project?
cre_Docs_and_Epenses
select t1.project_id , t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id group by t1.project_id having count(*) > 2
Question: what is the project id and detail for the project with at least two documents? | Tables: 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, Do...
what is the project id and detail for the project with at least two documents?
cre_Docs_and_Epenses
select t1.project_id , t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id group by t1.project_id having count(*) > 2
Question: return the ids and details corresponding to projects for which there are more than two documents. | Tables: 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...
return the ids and details corresponding to projects for which there are more than two documents.
cre_Docs_and_Epenses
select t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id where t2.document_name = 'king book'
Question: what is the project detail for the project with document 'king book'? | Tables: 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_Ty...
what is the project detail for the project with document 'king book'?
cre_Docs_and_Epenses
select t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id where t2.document_name = 'king book'
Question: give the details of the project with the document name 'king book'. | Tables: 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...
give the details of the project with the document name 'king book'.
cre_Docs_and_Epenses
select count(*) from ref_budget_codes
Question: how many budget types do we have? | Tables: 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, ...
how many budget types do we have?
cre_Docs_and_Epenses
select count(*) from ref_budget_codes
Question: count the number of budget codes. | Tables: 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, ...
count the number of budget codes.
cre_Docs_and_Epenses
select budget_type_code , budget_type_description from ref_budget_codes
Question: list all budget type codes and descriptions. | Tables: 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, Docu...
list all budget type codes and descriptions.
cre_Docs_and_Epenses
select budget_type_code , budget_type_description from ref_budget_codes
Question: what are the type codes and descriptions of each budget type? | Tables: 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,...
what are the type codes and descriptions of each budget type?
cre_Docs_and_Epenses
select budget_type_description from ref_budget_codes where budget_type_code = 'org'
Question: what is the description for the budget type with code org? | Tables: 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, Pr...
what is the description for the budget type with code org?
cre_Docs_and_Epenses
select budget_type_description from ref_budget_codes where budget_type_code = 'org'
Question: return the description of the budget type that has the code org. | Tables: 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_Co...
return the description of the budget type that has the code org.
cre_Docs_and_Epenses
select count(*) from documents_with_expenses
Question: how many documents have expenses? | Tables: 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, ...
how many documents have expenses?
cre_Docs_and_Epenses
select count(*) from documents_with_expenses
Question: count the number of documents with expenses. | Tables: 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, Docu...
count the number of documents with expenses.
cre_Docs_and_Epenses
select document_id from documents_with_expenses where budget_type_code = 'sf'
Question: what are the document ids for the budget type code 'sf'? | Tables: 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, Proj...
what are the document ids for the budget type code 'sf'?
cre_Docs_and_Epenses
select document_id from documents_with_expenses where budget_type_code = 'sf'
Question: give the ids of documents with expenses that have the budget code 'sf'. | Tables: 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_...
give the ids of documents with expenses that have the budget code 'sf'.
cre_Docs_and_Epenses
select t2.budget_type_code , t2.budget_type_description , t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code
Question: show the budget type code and description and the corresponding document id. | Tables: 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, Docu...
show the budget type code and description and the corresponding document id.
cre_Docs_and_Epenses
select t2.budget_type_code , t2.budget_type_description , t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code
Question: return the budget type codes, budget type descriptions and document ids for documents with expenses. | Tables: 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. Docume...
return the budget type codes, budget type descriptions and document ids for documents with expenses.
cre_Docs_and_Epenses
select t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code where t2.budget_type_description = 'government'
Question: show ids for all documents with budget types described as 'government'. | Tables: 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_...
show ids for all documents with budget types described as 'government'.
cre_Docs_and_Epenses
select t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code where t2.budget_type_description = 'government'
Question: give the ids for documents that have the budget description 'government'. | Tables: 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, Documen...
give the ids for documents that have the budget description 'government'.
cre_Docs_and_Epenses
select budget_type_code , count(*) from documents_with_expenses group by budget_type_code
Question: show budget type codes and the number of documents in each budget type. | Tables: 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_...
show budget type codes and the number of documents in each budget type.
cre_Docs_and_Epenses
select budget_type_code , count(*) from documents_with_expenses group by budget_type_code
Question: what are the different budget type codes, and how many documents are there for each? | Tables: 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_...
what are the different budget type codes, and how many documents are there for each?
cre_Docs_and_Epenses
select budget_type_code from documents_with_expenses group by budget_type_code order by count(*) desc limit 1
Question: what is the budget type code with most number of documents. | Tables: 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, P...
what is the budget type code with most number of documents.
cre_Docs_and_Epenses
select budget_type_code from documents_with_expenses group by budget_type_code order by count(*) desc limit 1
Question: give the budget type code that is most common among documents with expenses. | Tables: 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, Docu...
give the budget type code that is most common among documents with expenses.
cre_Docs_and_Epenses
select document_id from documents except select document_id from documents_with_expenses
Question: what are the ids of documents which don't have expense budgets? | Tables: 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_Cod...
what are the ids of documents which don't have expense budgets?
cre_Docs_and_Epenses
select document_id from documents except select document_id from documents_with_expenses
Question: return the ids of documents that do not have expenses. | Tables: 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, Projec...
return the ids of documents that do not have expenses.
cre_Docs_and_Epenses
select document_id from documents where document_type_code = 'cv' except select document_id from documents_with_expenses
Question: show ids for all documents in type cv without expense budgets. | Tables: 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...
show ids for all documents in type cv without expense budgets.
cre_Docs_and_Epenses
select document_id from documents where document_type_code = 'cv' except select document_id from documents_with_expenses
Question: what are the ids of documents with the type code cv that do not have expenses. | Tables: 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, Do...
what are the ids of documents with the type code cv that do not have expenses.
cre_Docs_and_Epenses
select t1.document_id from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%s%'
Question: what are the ids of documents with letter 's' in the name with any expense budgets. | Tables: 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_I...
what are the ids of documents with letter 's' in the name with any expense budgets.
cre_Docs_and_Epenses
select t1.document_id from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%s%'
Question: give the ids of documents that have expenses and contain the letter s in their names. | Tables: 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...
give the ids of documents that have expenses and contain the letter s in their names.
cre_Docs_and_Epenses
select count(*) from documents where document_id not in ( select document_id from documents_with_expenses )
Question: how many documents do not have any expense? | Tables: 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, Docum...
how many documents do not have any expense?
cre_Docs_and_Epenses
select count(*) from documents where document_id not in ( select document_id from documents_with_expenses )
Question: count the number of documents that do not have expenses. | Tables: 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, Proj...
count the number of documents that do not have expenses.
cre_Docs_and_Epenses
select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'gv' intersect select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'sf'
Question: what are the dates for the documents with both 'gv' type and 'sf' type expenses? | Tables: 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, ...
what are the dates for the documents with both 'gv' type and 'sf' type expenses?
cre_Docs_and_Epenses
select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'gv' intersect select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'sf'
Question: give the dates of creation for documents that have both budget type codes 'gv' and 'sf'. | Tables: 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 -> Docum...
give the dates of creation for documents that have both budget type codes 'gv' and 'sf'.
cre_Docs_and_Epenses
select max(account_details) from accounts union select account_details from accounts where account_details like '%5%'
Question: what are the account details with the largest value or with value having char '5' in it? | Tables: 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 -> Docum...
what are the account details with the largest value or with value having char '5' in it?
cre_Docs_and_Epenses
select max(account_details) from accounts union select account_details from accounts where account_details like '%5%'
Question: return the account details with the greatest value, as well as those that include the character 5. | Tables: 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. Document...
return the account details with the greatest value, as well as those that include the character 5.
scientist_1
select count(*) from scientists
Question: find the total number of scientists. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the total number of scientists.
scientist_1
select count(*) from scientists
Question: how many scientists are there? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
how many scientists are there?
scientist_1
select sum(hours) from projects
Question: find the total hours of all projects. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the total hours of all projects.
scientist_1
select sum(hours) from projects
Question: what is the total number of hours for all projects? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what is the total number of hours for all projects?
scientist_1
select count(distinct scientist) from assignedto
Question: how many different scientists are assigned to any project? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
how many different scientists are assigned to any project?
scientist_1
select count(distinct scientist) from assignedto
Question: count the number of different scientists assigned to any project. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
count the number of different scientists assigned to any project.
scientist_1
select count(distinct name) from projects
Question: find the number of distinct projects. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the number of distinct projects.
scientist_1
select count(distinct name) from projects
Question: how many different projects are there? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
how many different projects are there?
scientist_1
select avg(hours) from projects
Question: find the average hours of all projects. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the average hours of all projects.
scientist_1
select avg(hours) from projects
Question: what is the average hours across all projects? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what is the average hours across all projects?
scientist_1
select name from projects order by hours desc limit 1
Question: find the name of project that continues for the longest time. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the name of project that continues for the longest time.
scientist_1
select name from projects order by hours desc limit 1
Question: what is the name of the project with the most hours? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what is the name of the project with the most hours?
scientist_1
select name from projects where hours > (select avg(hours) from projects)
Question: list the name of all projects that are operated longer than the average working hours of all projects. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
list the name of all projects that are operated longer than the average working hours of all projects.
scientist_1
select name from projects where hours > (select avg(hours) from projects)
Question: what are the names of projects that have taken longer than the average number of hours for all projects? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what are the names of projects that have taken longer than the average number of hours for all projects?
scientist_1
select t1.name , t1.hours from projects as t1 join assignedto as t2 on t1.code = t2.project group by t2.project order by count(*) desc limit 1
Question: find the name and hours of project that has the most number of scientists. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the name and hours of project that has the most number of scientists.
scientist_1
select t1.name , t1.hours from projects as t1 join assignedto as t2 on t1.code = t2.project group by t2.project order by count(*) desc limit 1
Question: what is the name and hours for the project which has the most scientists assigned to it? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what is the name and hours for the project which has the most scientists assigned to it?
scientist_1
select t2.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name like '%smith%'
Question: find the name of the project for which a scientist whose name contains smith is assigned to. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the name of the project for which a scientist whose name contains smith is assigned to.
scientist_1
select t2.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name like '%smith%'
Question: what is the name of the project that has a scientist assigned to it whose name contains 'smith'? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what is the name of the project that has a scientist assigned to it whose name contains 'smith'?
scientist_1
select sum(t2.hours) from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name = 'michael rogers' or t3.name = 'carol smith'
Question: find the total hours of the projects that scientists named michael rogers or carol smith are assigned to. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the total hours of the projects that scientists named michael rogers or carol smith are assigned to.
scientist_1
select sum(t2.hours) from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name = 'michael rogers' or t3.name = 'carol smith'
Question: what is the sum of hours for projects that scientists with the name michael rogers or carol smith are assigned to? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what is the sum of hours for projects that scientists with the name michael rogers or carol smith are assigned to?
scientist_1
select name from projects where hours between 100 and 300
Question: find the name of projects that require between 100 and 300 hours of work. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the name of projects that require between 100 and 300 hours of work.
scientist_1
select name from projects where hours between 100 and 300
Question: what are the names of projects that require between 100 and 300 hours? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what are the names of projects that require between 100 and 300 hours?
scientist_1
select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.name = 'matter of time' intersect select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.na...
Question: find the name of the scientist who worked on both a project named 'matter of time' and a project named 'a puzzling parallax'. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the name of the scientist who worked on both a project named 'matter of time' and a project named 'a puzzling parallax'.
scientist_1
select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.name = 'matter of time' intersect select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.na...
Question: what are the names of any scientists who worked on projects named 'matter of time' and 'a puzzling pattern'? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what are the names of any scientists who worked on projects named 'matter of time' and 'a puzzling pattern'?
scientist_1
select name from scientists order by name
Question: list the names of all scientists sorted in alphabetical order. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
list the names of all scientists sorted in alphabetical order.
scientist_1
select name from scientists order by name
Question: what are the names of all the scientists in alphabetical order? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what are the names of all the scientists in alphabetical order?
scientist_1
select count(*) , t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project group by t1.name
Question: find the number of scientists involved for each project name. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the number of scientists involved for each project name.
scientist_1
select count(*) , t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project group by t1.name
Question: what are the naems of all the projects, and how many scientists were assigned to each of them? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what are the naems of all the projects, and how many scientists were assigned to each of them?
scientist_1
select count(*) , t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project where t1.hours > 300 group by t1.name
Question: find the number of scientists involved for the projects that require more than 300 hours. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the number of scientists involved for the projects that require more than 300 hours.
scientist_1
select count(*) , t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project where t1.hours > 300 group by t1.name
Question: what are the names of projects that require more than 300 hours, and how many scientists are assigned to each? | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
what are the names of projects that require more than 300 hours, and how many scientists are assigned to each?
scientist_1
select count(*) , t1.name from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist group by t1.name
Question: find the number of projects which each scientist is working on and scientist's name. | Tables: Scientists -> SSN, Name. Projects -> Code, Name, Hours. AssignedTo -> Scientist, Project. | Joins: AssignedTo.Project = Projects.Code, AssignedTo.Scientist = Scientists.SSN,
find the number of projects which each scientist is working on and scientist's name.