db_id
stringclasses 20
values | question
stringlengths 18
174
| db_info
stringclasses 20
values | ground_truth
stringlengths 20
474
|
---|---|---|---|
cre_Doc_Template_Mgt | What are the ids, names, and descriptions for all documents? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id , document_name , document_description from documents |
cre_Doc_Template_Mgt | What is the document name and template id for document with description with the letter 'w' in it? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_name , template_id from documents where document_description like '%w%' |
cre_Doc_Template_Mgt | Return the names and template ids for documents that contain the letter w in their description. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_name , template_id from documents where document_description like '%w%' |
cre_Doc_Template_Mgt | What is the document id, template id and description for document named "Robbin CV"? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id , template_id , document_description from documents where document_name = 'Robbin CV' |
cre_Doc_Template_Mgt | Return the document id, template id, and description for the document with the name Robbin CV. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id , template_id , document_description from documents where document_name = 'Robbin CV' |
cre_Doc_Template_Mgt | How many different templates do all document use? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( distinct template_id ) from documents |
cre_Doc_Template_Mgt | Count the number of different templates used for documents. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( distinct template_id ) from documents |
cre_Doc_Template_Mgt | How many documents are using the template with type code 'PPT'? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT' |
cre_Doc_Template_Mgt | Count the number of documents that use the PPT template type. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT' |
cre_Doc_Template_Mgt | Show all template ids and number of documents using each template. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id , count ( * ) from documents group by template_id |
cre_Doc_Template_Mgt | What are all different template ids used for documents, and how many times were each of them used? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id , count ( * ) from documents group by template_id |
cre_Doc_Template_Mgt | What is the id and type code for the template used by the most documents? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select documents.template_id , templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by documents.template_id order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | Return the id and type code of the template that is used for the greatest number of documents. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select documents.template_id , templates.template_type_code from documents join templates on documents.template_id = templates.template_id group by documents.template_id order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | Show ids for all templates that are used by more than one document. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id from documents group by template_id having count ( * ) > 1 |
cre_Doc_Template_Mgt | What are the template ids of any templates used in more than a single document? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id from documents group by template_id having count ( * ) > 1 |
cre_Doc_Template_Mgt | Show ids for all templates not used by any document. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id from templates except select template_id from documents |
cre_Doc_Template_Mgt | What are the ids for templates that are not used in any documents? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id from templates except select template_id from documents |
cre_Doc_Template_Mgt | How many templates do we have? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from templates |
cre_Doc_Template_Mgt | Count the number of templates. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from templates |
cre_Doc_Template_Mgt | Show template ids, version numbers, and template type codes for all templates. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id , version_number , template_type_code from templates |
cre_Doc_Template_Mgt | What are the ids, version numbers, and type codes for each template? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id , version_number , template_type_code from templates |
cre_Doc_Template_Mgt | Show all distinct template type codes for all templates. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select distinct template_type_code from templates |
cre_Doc_Template_Mgt | What are the different template type codes? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select distinct template_type_code from templates |
cre_Doc_Template_Mgt | What are the ids of templates with template type code PP or PPT? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id from templates where template_type_code = 'PP' or template_type_code = 'PPT' |
cre_Doc_Template_Mgt | Return the ids of templates that have the code PP or PPT. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_id from templates where template_type_code = 'PP' or template_type_code = 'PPT' |
cre_Doc_Template_Mgt | How many templates have template type code CV? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from templates where template_type_code = 'CV' |
cre_Doc_Template_Mgt | Count the number of templates of the type CV. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from templates where template_type_code = 'CV' |
cre_Doc_Template_Mgt | What is the version number and template type code for the template with version number later than 5? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select version_number , template_type_code from templates where version_number > 5 |
cre_Doc_Template_Mgt | Return the version numbers and template type codes of templates with a version number greater than 5. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select version_number , template_type_code from templates where version_number > 5 |
cre_Doc_Template_Mgt | Show all template type codes and number of templates for each. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code , count ( * ) from templates group by template_type_code |
cre_Doc_Template_Mgt | What are the different template type codes, and how many templates correspond to each? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code , count ( * ) from templates group by template_type_code |
cre_Doc_Template_Mgt | Which template type code has most number of templates? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | Return the type code of the template type that the most templates belong to. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | Show all template type codes with less than three templates. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from templates group by template_type_code having count ( * ) < 3 |
cre_Doc_Template_Mgt | What are the codes of template types that have fewer than 3 templates? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from templates group by template_type_code having count ( * ) < 3 |
cre_Doc_Template_Mgt | What the smallest version number and its template type code? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select min ( version_number ) , template_type_code from templates |
cre_Doc_Template_Mgt | Return the lowest version number, along with its corresponding template type code. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select min ( version_number ) , template_type_code from templates |
cre_Doc_Template_Mgt | What is the template type code of the template used by document with the name "Data base"? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_type_code from templates join documents on templates.template_id = documents.template_id where documents.document_name = 'Data base' |
cre_Doc_Template_Mgt | Return the template type code of the template that is used by a document named Data base. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_type_code from templates join documents on templates.template_id = documents.template_id where documents.document_name = 'Data base' |
cre_Doc_Template_Mgt | Show all document names using templates with template type code BK. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select documents.document_name from templates join documents on templates.template_id = documents.template_id where templates.template_type_code = 'BK' |
cre_Doc_Template_Mgt | What are the names of documents that use templates with the code BK? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select documents.document_name from templates join documents on templates.template_id = documents.template_id where templates.template_type_code = 'BK' |
cre_Doc_Template_Mgt | Show all template type codes and the number of documents using each type. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_type_code , count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code |
cre_Doc_Template_Mgt | What are the different template type codes, and how many documents use each type? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_type_code , count ( * ) from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code |
cre_Doc_Template_Mgt | Which template type code is used by most number of documents? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | Return the code of the template type that is most commonly used in documents. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_type_code from templates join documents on templates.template_id = documents.template_id group by templates.template_type_code order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | Show all template type codes that are not used by any document. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id |
cre_Doc_Template_Mgt | What are the codes of template types that are not used for any document? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from templates except select template_type_code from templates join documents on templates.template_id = documents.template_id |
cre_Doc_Template_Mgt | Show all template type codes and descriptions. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code , template_type_description from ref_template_types |
cre_Doc_Template_Mgt | What are the type codes and descriptions for all template types? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code , template_type_description from ref_template_types |
cre_Doc_Template_Mgt | What is the template type descriptions for template type code "AD". | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_description from ref_template_types where template_type_code = 'AD' |
cre_Doc_Template_Mgt | Return the template type description of the template type with the code AD. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_description from ref_template_types where template_type_code = 'AD' |
cre_Doc_Template_Mgt | What is the template type code for template type description "Book". | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from ref_template_types where template_type_description = 'Book' |
cre_Doc_Template_Mgt | Return the type code of the template type with the description "Book". | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select template_type_code from ref_template_types where template_type_description = 'Book' |
cre_Doc_Template_Mgt | What are the distinct template type descriptions for the templates ever used by any document? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id |
cre_Doc_Template_Mgt | Return the different descriptions for templates that have been used in a document. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select distinct ref_template_types.template_type_description from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code join documents on templates.template_id = documents.template_id |
cre_Doc_Template_Mgt | What are the template ids with template type description "Presentation". | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_id from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code where ref_template_types.template_type_description = 'Presentation' |
cre_Doc_Template_Mgt | Return the ids corresponding to templates with the description 'Presentation'. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select templates.template_id from ref_template_types join templates on ref_template_types.template_type_code = templates.template_type_code where ref_template_types.template_type_description = 'Presentation' |
cre_Doc_Template_Mgt | How many paragraphs in total? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from paragraphs |
cre_Doc_Template_Mgt | Count the number of paragraphs. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from paragraphs |
cre_Doc_Template_Mgt | How many paragraphs for the document with name 'Summer Show'? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show' |
cre_Doc_Template_Mgt | Count the number of paragraphs in the document named 'Summer Show'. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show' |
cre_Doc_Template_Mgt | Show paragraph details for paragraph with text 'Korea ' . | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select other_details from paragraphs where paragraph_text like 'korea' |
cre_Doc_Template_Mgt | What are the details for the paragraph that includes the text 'Korea ' ? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select other_details from paragraphs where paragraph_text like 'korea' |
cre_Doc_Template_Mgt | Show all paragraph ids and texts for the document with name 'Welcome to NY'. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.paragraph_id , paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY' |
cre_Doc_Template_Mgt | What are the ids and texts of paragraphs in the document titled 'Welcome to NY'? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.paragraph_id , paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Welcome to NY' |
cre_Doc_Template_Mgt | Show all paragraph texts for the document "Customer reviews". | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Customer reviews' |
cre_Doc_Template_Mgt | What are the paragraph texts for the document with the name 'Customer reviews'? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Customer reviews' |
cre_Doc_Template_Mgt | Show all document ids and the number of paragraphs in each document. Order by document id. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id , count ( * ) from paragraphs group by document_id order by document_id asc |
cre_Doc_Template_Mgt | Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id , count ( * ) from paragraphs group by document_id order by document_id asc |
cre_Doc_Template_Mgt | Show all document ids, names and the number of paragraphs in each document. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.document_id , documents.document_name , count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id |
cre_Doc_Template_Mgt | What are the ids and names of each document, as well as the number of paragraphs in each? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.document_id , documents.document_name , count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id |
cre_Doc_Template_Mgt | List all document ids with at least two paragraphs. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs group by document_id having count ( * ) >= 2 |
cre_Doc_Template_Mgt | What are the ids of documents that have 2 or more paragraphs? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs group by document_id having count ( * ) >= 2 |
cre_Doc_Template_Mgt | What is the document id and name with greatest number of paragraphs? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.document_id , documents.document_name from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | Return the id and name of the document with the most paragraphs. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select paragraphs.document_id , documents.document_name from paragraphs join documents on paragraphs.document_id = documents.document_id group by paragraphs.document_id order by count ( * ) desc limit 1 |
cre_Doc_Template_Mgt | What is the document id with least number of paragraphs? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs group by document_id order by count ( * ) asc limit 1 |
cre_Doc_Template_Mgt | Return the id of the document with the fewest paragraphs. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs group by document_id order by count ( * ) asc limit 1 |
cre_Doc_Template_Mgt | What is the document id with 1 to 2 paragraphs? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs group by document_id having count ( * ) between 1 and 2 |
cre_Doc_Template_Mgt | Give the ids of documents that have between one and two paragraphs. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs group by document_id having count ( * ) between 1 and 2 |
cre_Doc_Template_Mgt | Show the document id with paragraph text 'Brazil' and 'Ireland'. | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland' |
cre_Doc_Template_Mgt | What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'? | # 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_details )
# paragraphs ( paragraph_id , document_id , paragraph_text , other_details )
# templates.template_type_code = ref_template_types.template_type_code
# documents.template_id = templates.template_id
# paragraphs.document_id = documents.document_id
| select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland' |
course_teach | How many teachers are there? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select count ( * ) from teacher |
course_teach | What is the total count of teachers? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select count ( * ) from teacher |
course_teach | List the names of teachers in ascending order of age. | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select name from teacher order by age asc |
course_teach | What are the names of the teachers ordered by ascending age? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select name from teacher order by age asc |
course_teach | What are the age and hometown of teachers? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select age , hometown from teacher |
course_teach | What is the age and hometown of every teacher? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select age , hometown from teacher |
course_teach | List the name of teachers whose hometown is not `` Little Lever Urban District '' . | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select name from teacher where hometown != 'little lever urban district' |
course_teach | What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select name from teacher where hometown != 'little lever urban district' |
course_teach | Show the name of teachers aged either 32 or 33? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select name from teacher where age = 32 or age = 33 |
course_teach | What are the names of the teachers who are aged either 32 or 33? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select name from teacher where age = 32 or age = 33 |
course_teach | What is the hometown of the youngest teacher? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown from teacher order by age asc limit 1 |
course_teach | Where is the youngest teacher from? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown from teacher order by age asc limit 1 |
course_teach | Show different hometown of teachers and the number of teachers from each hometown. | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown , count ( * ) from teacher group by hometown |
course_teach | For each hometown, how many teachers are there? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown , count ( * ) from teacher group by hometown |
course_teach | List the most common hometown of teachers. | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown from teacher group by hometown order by count ( * ) desc limit 1 |
course_teach | What is the most commmon hometowns for teachers? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown from teacher group by hometown order by count ( * ) desc limit 1 |
course_teach | Show the hometowns shared by at least two teachers. | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown from teacher group by hometown having count ( * ) >= 2 |
course_teach | What are the towns from which at least two teachers come from? | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select hometown from teacher group by hometown having count ( * ) >= 2 |
course_teach | Show names of teachers and the courses they are arranged to teach. | # course ( course_id , staring_date , course )
# teacher ( teacher_id , name , age , hometown )
# course_arrange ( course_id , teacher_id , grade )
# course_arrange.teacher_id = teacher.teacher_id
# course_arrange.course_id = course.course_id
| select teacher.name , course.course from course_arrange join course on course_arrange.course_id = course.course_id join teacher on course_arrange.teacher_id = teacher.teacher_id |