db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
employee_hire_evaluation
select min(number_products) , max(number_products) from shop
Question: what are the minimum and maximum number of products across all the shops? | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Jo...
what are the minimum and maximum number of products across all the shops?
employee_hire_evaluation
select name , location , district from shop order by number_products desc
Question: return the name, location and district of all shops in descending order of number of products. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year...
return the name, location and district of all shops in descending order of number of products.
employee_hire_evaluation
select name , location , district from shop order by number_products desc
Question: sort all the shops by number products in descending order, and return the name, location and district of each shop. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation...
sort all the shops by number products in descending order, and return the name, location and district of each shop.
employee_hire_evaluation
select name from shop where number_products > (select avg(number_products) from shop)
Question: find the names of stores whose number products is more than the average number of products. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_aw...
find the names of stores whose number products is more than the average number of products.
employee_hire_evaluation
select name from shop where number_products > (select avg(number_products) from shop)
Question: which shops' number products is above the average? give me the shop names. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | J...
which shops' number products is above the average? give me the shop names.
employee_hire_evaluation
select t1.name from employee as t1 join evaluation as t2 on t1.employee_id = t2.employee_id group by t2.employee_id order by count(*) desc limit 1
Question: find the name of employee who was awarded the most times in the evaluation. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | ...
find the name of employee who was awarded the most times in the evaluation.
employee_hire_evaluation
select t1.name from employee as t1 join evaluation as t2 on t1.employee_id = t2.employee_id group by t2.employee_id order by count(*) desc limit 1
Question: which employee received the most awards in evaluations? give me the employee name. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bo...
which employee received the most awards in evaluations? give me the employee name.
employee_hire_evaluation
select t1.name from employee as t1 join evaluation as t2 on t1.employee_id = t2.employee_id order by t2.bonus desc limit 1
Question: find the name of the employee who got the highest one time bonus. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hir...
find the name of the employee who got the highest one time bonus.
employee_hire_evaluation
select t1.name from employee as t1 join evaluation as t2 on t1.employee_id = t2.employee_id order by t2.bonus desc limit 1
Question: which employee received the biggest bonus? give me the employee name. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins:...
which employee received the biggest bonus? give me the employee name.
employee_hire_evaluation
select name from employee where employee_id not in (select employee_id from evaluation)
Question: find the names of employees who never won any award in the evaluation. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins...
find the names of employees who never won any award in the evaluation.
employee_hire_evaluation
select name from employee where employee_id not in (select employee_id from evaluation)
Question: what are the names of the employees who never received any evaluation? | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins...
what are the names of the employees who never received any evaluation?
employee_hire_evaluation
select t2.name from hiring as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by count(*) desc limit 1
Question: what is the name of the shop that is hiring the largest number of employees? | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. |...
what is the name of the shop that is hiring the largest number of employees?
employee_hire_evaluation
select t2.name from hiring as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by count(*) desc limit 1
Question: which shop has the most employees? give me the shop name. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Empl...
which shop has the most employees? give me the shop name.
employee_hire_evaluation
select name from shop where shop_id not in (select shop_id from hiring)
Question: find the name of the shops that do not hire any employee. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Empl...
find the name of the shops that do not hire any employee.
employee_hire_evaluation
select name from shop where shop_id not in (select shop_id from hiring)
Question: which shops run with no employees? find the shop names | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Employe...
which shops run with no employees? find the shop names
employee_hire_evaluation
select count(*) , t2.name from hiring as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t2.name
Question: find the number of employees hired in each shop; show the shop name as well. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. |...
find the number of employees hired in each shop; show the shop name as well.
employee_hire_evaluation
select count(*) , t2.name from hiring as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t2.name
Question: for each shop, return the number of employees working there and the name of the shop. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded,...
for each shop, return the number of employees working there and the name of the shop.
employee_hire_evaluation
select sum(bonus) from evaluation
Question: what is total bonus given in all evaluations? | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Employee_ID = em...
what is total bonus given in all evaluations?
employee_hire_evaluation
select sum(bonus) from evaluation
Question: find the total amount of bonus given in all the evaluations. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.E...
find the total amount of bonus given in all the evaluations.
employee_hire_evaluation
select * from hiring
Question: give me all the information about hiring. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Employee_ID = employ...
give me all the information about hiring.
employee_hire_evaluation
select * from hiring
Question: what is all the information about hiring? | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Employee_ID = employ...
what is all the information about hiring?
employee_hire_evaluation
select district from shop where number_products < 3000 intersect select district from shop where number_products > 10000
Question: which district has both stores with less than 3000 products and stores with more than 10000 products? | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_I...
which district has both stores with less than 3000 products and stores with more than 10000 products?
employee_hire_evaluation
select district from shop where number_products < 3000 intersect select district from shop where number_products > 10000
Question: find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. e...
find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.
employee_hire_evaluation
select count(distinct location) from shop
Question: how many different store locations are there? | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Employee_ID = em...
how many different store locations are there?
employee_hire_evaluation
select count(distinct location) from shop
Question: count the number of distinct store locations. | Tables: employee -> Employee_ID, Name, Age, City. shop -> Shop_ID, Name, Location, District, Number_products, Manager_name. hiring -> Shop_ID, Employee_ID, Start_from, Is_full_time. evaluation -> Employee_ID, Year_awarded, Bonus. | Joins: hiring.Employee_ID = em...
count the number of distinct store locations.
cre_Doc_Template_Mgt
select count(*) from documents
Question: how many documents do we have? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_Description, Othe...
how many documents do we have?
cre_Doc_Template_Mgt
select count(*) from documents
Question: count the number of documents. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_Description, Othe...
count the number of documents.
cre_Doc_Template_Mgt
select document_id , document_name , document_description from documents
Question: list document ids, document names, and document descriptions for all documents. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Templ...
list document ids, document names, and document descriptions for all documents.
cre_Doc_Template_Mgt
select document_id , document_name , document_description from documents
Question: what are the ids, names, and descriptions for all documents? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Na...
what are the ids, names, and descriptions for all documents?
cre_Doc_Template_Mgt
select document_name , template_id from documents where document_description like '%w%'
Question: what is the document name and template id for document with description with the letter 'w' in it? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents ->...
what is the document name and template id for document with description with the letter 'w' in it?
cre_Doc_Template_Mgt
select document_name , template_id from documents where document_description like '%w%'
Question: return the names and template ids for documents that contain the letter w in their description. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Do...
return the names and template ids for documents that contain the letter w in their description.
cre_Doc_Template_Mgt
select document_id , template_id , document_description from documents where document_name = 'robbin cv'
Question: what is the document id, template id and description for document named 'robbin cv'? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, ...
what is the document id, template id and description for document named 'robbin cv'?
cre_Doc_Template_Mgt
select document_id , template_id , document_description from documents where document_name = 'robbin cv'
Question: return the document id, template id, and description for the document with the name robbin cv. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Doc...
return the document id, template id, and description for the document with the name robbin cv.
cre_Doc_Template_Mgt
select count(distinct template_id) from documents
Question: how many different templates do all document use? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Documen...
how many different templates do all document use?
cre_Doc_Template_Mgt
select count(distinct template_id) from documents
Question: count the number of different templates used for documents. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Nam...
count the number of different templates used for documents.
cre_Doc_Template_Mgt
select count(*) from documents as t1 join templates as t2 on t1.template_id = t2.template_id where t2.template_type_code = 'ppt'
Question: how many documents are using the template with type code 'ppt'? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document...
how many documents are using the template with type code 'ppt'?
cre_Doc_Template_Mgt
select count(*) from documents as t1 join templates as t2 on t1.template_id = t2.template_id where t2.template_type_code = 'ppt'
Question: count the number of documents that use the ppt template type. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_N...
count the number of documents that use the ppt template type.
cre_Doc_Template_Mgt
select template_id , count(*) from documents group by template_id
Question: show all template ids and number of documents using each template. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Docum...
show all template ids and number of documents using each template.
cre_Doc_Template_Mgt
select template_id , count(*) from documents group by template_id
Question: what are all different template ids used for documents, and how many times were each of them used? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents ->...
what are all different template ids used for documents, and how many times were each of them used?
cre_Doc_Template_Mgt
select t1.template_id , t2.template_type_code from documents as t1 join templates as t2 on t1.template_id = t2.template_id group by t1.template_id order by count(*) desc limit 1
Question: what is the id and type code for the template used by the most documents? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID...
what is the id and type code for the template used by the most documents?
cre_Doc_Template_Mgt
select t1.template_id , t2.template_type_code from documents as t1 join templates as t2 on t1.template_id = t2.template_id group by t1.template_id order by count(*) desc limit 1
Question: return the id and type code of the template that is used for the greatest number of documents. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Doc...
return the id and type code of the template that is used for the greatest number of documents.
cre_Doc_Template_Mgt
select template_id from documents group by template_id having count(*) > 1
Question: show ids for all templates that are used by more than one document. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Docu...
show ids for all templates that are used by more than one document.
cre_Doc_Template_Mgt
select template_id from documents group by template_id having count(*) > 1
Question: what are the template ids of any templates used in more than a single document? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Templ...
what are the template ids of any templates used in more than a single document?
cre_Doc_Template_Mgt
select template_id from templates except select template_id from documents
Question: show ids for all templates not used by any document. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Docu...
show ids for all templates not used by any document.
cre_Doc_Template_Mgt
select template_id from templates except select template_id from documents
Question: what are the ids for templates that are not used in any documents? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Docum...
what are the ids for templates that are not used in any documents?
cre_Doc_Template_Mgt
select count(*) from templates
Question: how many templates do we have? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_Description, Othe...
how many templates do we have?
cre_Doc_Template_Mgt
select count(*) from templates
Question: count the number of templates. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_Description, Othe...
count the number of templates.
cre_Doc_Template_Mgt
select template_id , version_number , template_type_code from templates
Question: show template ids, version numbers, and template type codes for all templates. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Templa...
show template ids, version numbers, and template type codes for all templates.
cre_Doc_Template_Mgt
select template_id , version_number , template_type_code from templates
Question: what are the ids, version numbers, and type codes for each template? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Doc...
what are the ids, version numbers, and type codes for each template?
cre_Doc_Template_Mgt
select distinct template_type_code from templates
Question: show all distinct template type codes for all templates. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, ...
show all distinct template type codes for all templates.
cre_Doc_Template_Mgt
select distinct template_type_code from templates
Question: what are the different template type codes? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_Desc...
what are the different template type codes?
cre_Doc_Template_Mgt
select template_id from templates where template_type_code = 'pp' or template_type_code = 'ppt'
Question: what are the ids of templates with template type code pp or ppt? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Documen...
what are the ids of templates with template type code pp or ppt?
cre_Doc_Template_Mgt
select template_id from templates where template_type_code = 'pp' or template_type_code = 'ppt'
Question: return the ids of templates that have the code pp or ppt. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name,...
return the ids of templates that have the code pp or ppt.
cre_Doc_Template_Mgt
select count(*) from templates where template_type_code = 'cv'
Question: how many templates have template type code cv? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_D...
how many templates have template type code cv?
cre_Doc_Template_Mgt
select count(*) from templates where template_type_code = 'cv'
Question: count the number of templates of the type cv. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_De...
count the number of templates of the type cv.
cre_Doc_Template_Mgt
select version_number , template_type_code from templates where version_number > 5
Question: what is the version number and template type code for the template with version number later than 5? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents ...
what is the version number and template type code for the template with version number later than 5?
cre_Doc_Template_Mgt
select version_number , template_type_code from templates where version_number > 5
Question: return the version numbers and template type codes of templates with a version number greater than 5. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents...
return the version numbers and template type codes of templates with a version number greater than 5.
cre_Doc_Template_Mgt
select template_type_code , count(*) from templates group by template_type_code
Question: show all template type codes and number of templates for each. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_...
show all template type codes and number of templates for each.
cre_Doc_Template_Mgt
select template_type_code , count(*) from templates group by template_type_code
Question: what are the different template type codes, and how many templates correspond to each? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID...
what are the different template type codes, and how many templates correspond to each?
cre_Doc_Template_Mgt
select template_type_code from templates group by template_type_code order by count(*) desc limit 1
Question: which template type code has most number of templates? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Do...
which template type code has most number of templates?
cre_Doc_Template_Mgt
select template_type_code from templates group by template_type_code order by count(*) desc limit 1
Question: return the type code of the template type that the most templates belong to. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template...
return the type code of the template type that the most templates belong to.
cre_Doc_Template_Mgt
select template_type_code from templates group by template_type_code having count(*) < 3
Question: show all template type codes with less than three templates. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Na...
show all template type codes with less than three templates.
cre_Doc_Template_Mgt
select template_type_code from templates group by template_type_code having count(*) < 3
Question: what are the codes of template types that have fewer than 3 templates? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, D...
what are the codes of template types that have fewer than 3 templates?
cre_Doc_Template_Mgt
select min(version_number) , template_type_code from templates
Question: what the smallest version number and its template type code? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Na...
what the smallest version number and its template type code?
cre_Doc_Template_Mgt
select min(version_number) , template_type_code from templates
Question: return the lowest version number, along with its corresponding template type code. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Te...
return the lowest version number, along with its corresponding template type code.
cre_Doc_Template_Mgt
select t1.template_type_code from templates as t1 join documents as t2 on t1.template_id = t2.template_id where t2.document_name = 'data base'
Question: what is the template type code of the template used by document with the name 'data base'? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Documen...
what is the template type code of the template used by document with the name 'data base'?
cre_Doc_Template_Mgt
select t1.template_type_code from templates as t1 join documents as t2 on t1.template_id = t2.template_id where t2.document_name = 'data base'
Question: return the template type code of the template that is used by a document named data base. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document...
return the template type code of the template that is used by a document named data base.
cre_Doc_Template_Mgt
select t2.document_name from templates as t1 join documents as t2 on t1.template_id = t2.template_id where t1.template_type_code = 'bk'
Question: show all document names using templates with template type code bk. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Docu...
show all document names using templates with template type code bk.
cre_Doc_Template_Mgt
select t2.document_name from templates as t1 join documents as t2 on t1.template_id = t2.template_id where t1.template_type_code = 'bk'
Question: what are the names of documents that use templates with the code bk? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Doc...
what are the names of documents that use templates with the code bk?
cre_Doc_Template_Mgt
select t1.template_type_code , count(*) from templates as t1 join documents as t2 on t1.template_id = t2.template_id group by t1.template_type_code
Question: show all template type codes and the number of documents using each type. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID...
show all template type codes and the number of documents using each type.
cre_Doc_Template_Mgt
select t1.template_type_code , count(*) from templates as t1 join documents as t2 on t1.template_id = t2.template_id group by t1.template_type_code
Question: what are the different template type codes, and how many documents use each type? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Tem...
what are the different template type codes, and how many documents use each type?
cre_Doc_Template_Mgt
select t1.template_type_code from templates as t1 join documents as t2 on t1.template_id = t2.template_id group by t1.template_type_code order by count(*) desc limit 1
Question: which template type code is used by most number of documents? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_N...
which template type code is used by most number of documents?
cre_Doc_Template_Mgt
select t1.template_type_code from templates as t1 join documents as t2 on t1.template_id = t2.template_id group by t1.template_type_code order by count(*) desc limit 1
Question: return the code of the template type that is most commonly used in documents. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Templat...
return the code of the template type that is most commonly used in documents.
cre_Doc_Template_Mgt
select template_type_code from templates except select template_type_code from templates as t1 join documents as t2 on t1.template_id = t2.template_id
Question: show all template type codes that are not used by any document. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document...
show all template type codes that are not used by any document.
cre_Doc_Template_Mgt
select template_type_code from templates except select template_type_code from templates as t1 join documents as t2 on t1.template_id = t2.template_id
Question: what are the codes of template types that are not used for any document? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID,...
what are the codes of template types that are not used for any document?
cre_Doc_Template_Mgt
select template_type_code , template_type_description from ref_template_types
Question: show all template type codes and descriptions. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_D...
show all template type codes and descriptions.
cre_Doc_Template_Mgt
select template_type_code , template_type_description from ref_template_types
Question: what are the type codes and descriptions for all template types? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Documen...
what are the type codes and descriptions for all template types?
cre_Doc_Template_Mgt
select template_type_description from ref_template_types where template_type_code = 'ad'
Question: what is the template type descriptions for template type code 'ad'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Docu...
what is the template type descriptions for template type code 'ad'.
cre_Doc_Template_Mgt
select template_type_description from ref_template_types where template_type_code = 'ad'
Question: return the template type description of the template type with the code ad. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_...
return the template type description of the template type with the code ad.
cre_Doc_Template_Mgt
select template_type_code from ref_template_types where template_type_description = 'book'
Question: what is the template type code for template type description 'book'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Doc...
what is the template type code for template type description 'book'.
cre_Doc_Template_Mgt
select template_type_code from ref_template_types where template_type_description = 'book'
Question: return the type code of the template type with the description 'book'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, D...
return the type code of the template type with the description 'book'.
cre_Doc_Template_Mgt
select distinct t1.template_type_description from ref_template_types as t1 join templates as t2 on t1.template_type_code = t2.template_type_code join documents as t3 on t2.template_id = t3.template_id
Question: what are the distinct template type descriptions for the templates ever used by any document? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Docu...
what are the distinct template type descriptions for the templates ever used by any document?
cre_Doc_Template_Mgt
select distinct t1.template_type_description from ref_template_types as t1 join templates as t2 on t1.template_type_code = t2.template_type_code join documents as t3 on t2.template_id = t3.template_id
Question: return the different descriptions for templates that have been used in a document. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Te...
return the different descriptions for templates that have been used in a document.
cre_Doc_Template_Mgt
select t2.template_id from ref_template_types as t1 join templates as t2 on t1.template_type_code = t2.template_type_code where t1.template_type_description = 'presentation'
Question: what are the template ids with template type description 'presentation'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID,...
what are the template ids with template type description 'presentation'.
cre_Doc_Template_Mgt
select t2.template_id from ref_template_types as t1 join templates as t2 on t1.template_type_code = t2.template_type_code where t1.template_type_description = 'presentation'
Question: return the ids corresponding to templates with the description 'presentation'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Templa...
return the ids corresponding to templates with the description 'presentation'.
cre_Doc_Template_Mgt
select count(*) from paragraphs
Question: how many paragraphs in total? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_Description, Other...
how many paragraphs in total?
cre_Doc_Template_Mgt
select count(*) from paragraphs
Question: count the number of paragraphs. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Document_Description, Oth...
count the number of paragraphs.
cre_Doc_Template_Mgt
select count(*) from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id where t2.document_name = 'summer show'
Question: how many paragraphs for the document with name 'summer show'? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_N...
how many paragraphs for the document with name 'summer show'?
cre_Doc_Template_Mgt
select count(*) from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id where t2.document_name = 'summer show'
Question: count the number of paragraphs in the document named 'summer show'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Docu...
count the number of paragraphs in the document named 'summer show'.
cre_Doc_Template_Mgt
select other_details from paragraphs where paragraph_text like 'korea'
Question: show paragraph details for paragraph with text 'korea ' . | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name,...
show paragraph details for paragraph with text 'korea ' .
cre_Doc_Template_Mgt
select other_details from paragraphs where paragraph_text like 'korea'
Question: what are the details for the paragraph that includes the text 'korea ' ? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID,...
what are the details for the paragraph that includes the text 'korea ' ?
cre_Doc_Template_Mgt
select t1.paragraph_id , t1.paragraph_text from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id where t2.document_name = 'welcome to ny'
Question: show all paragraph ids and texts for the document with name 'welcome to ny'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template...
show all paragraph ids and texts for the document with name 'welcome to ny'.
cre_Doc_Template_Mgt
select t1.paragraph_id , t1.paragraph_text from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id where t2.document_name = 'welcome to ny'
Question: what are the ids and texts of paragraphs in the document titled 'welcome to ny'? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Temp...
what are the ids and texts of paragraphs in the document titled 'welcome to ny'?
cre_Doc_Template_Mgt
select t1.paragraph_text from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id where t2.document_name = 'customer reviews'
Question: show all paragraph texts for the document 'customer reviews'. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_N...
show all paragraph texts for the document 'customer reviews'.
cre_Doc_Template_Mgt
select t1.paragraph_text from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id where t2.document_name = 'customer reviews'
Question: what are the paragraph texts for the document with the name 'customer reviews'? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Templ...
what are the paragraph texts for the document with the name 'customer reviews'?
cre_Doc_Template_Mgt
select document_id , count(*) from paragraphs group by document_id order by document_id
Question: show all document ids and the number of paragraphs in each document. order by document id. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Documen...
show all document ids and the number of paragraphs in each document. order by document id.
cre_Doc_Template_Mgt
select document_id , count(*) from paragraphs group by document_id order by document_id
Question: return the different document ids along with the number of paragraphs corresponding to each, ordered by id. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Doc...
return the different document ids along with the number of paragraphs corresponding to each, ordered by id.
cre_Doc_Template_Mgt
select t1.document_id , t2.document_name , count(*) from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id group by t1.document_id
Question: show all document ids, names and the number of paragraphs in each document. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_...
show all document ids, names and the number of paragraphs in each document.
cre_Doc_Template_Mgt
select t1.document_id , t2.document_name , count(*) from paragraphs as t1 join documents as t2 on t1.document_id = t2.document_id group by t1.document_id
Question: what are the ids and names of each document, as well as the number of paragraphs in each? | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document...
what are the ids and names of each document, as well as the number of paragraphs in each?
cre_Doc_Template_Mgt
select document_id from paragraphs group by document_id having count(*) >= 2
Question: list all document ids with at least two paragraphs. | Tables: Ref_Template_Types -> Template_Type_Code, Template_Type_Description. Templates -> Template_ID, Version_Number, Template_Type_Code, Date_Effective_From, Date_Effective_To, Template_Details. Documents -> Document_ID, Template_ID, Document_Name, Docum...
list all document ids with at least two paragraphs.