index
int32 0
1.03k
| db_id
stringclasses 20
values | question
stringlengths 18
174
| db_info
stringlengths 1
1.79k
| ground_truth
stringlengths 20
474
|
---|---|---|---|---|
300 | cre_Doc_Template_Mgt | What are the ids, names, and descriptions for all documents? | | documents: document_id, document_name, document_description, template_id, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | paragraphs.document_id = documents.document_id | | select document_id , document_name , document_description from documents |
301 | cre_Doc_Template_Mgt | What is the document name and template id for document with description with the letter 'w' in it? | | documents: document_description, document_name, template_id, document_id, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | ref_template_types: template_type_code, template_type_description | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | templates.template_type_code = ref_template_types.template_type_code | | select document_name , template_id from documents where document_description like '%w%' |
302 | cre_Doc_Template_Mgt | Return the names and template ids for documents that contain the letter w in their description. | | documents: document_description, template_id, document_name, document_id | templates: template_id, template_details, template_type_code | ref_template_types: template_type_code, template_type_description | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | | select document_name , template_id from documents where document_description like '%w%' |
303 | cre_Doc_Template_Mgt | What is the document id, template id and description for document named "Robbin CV"? | | documents: document_name, document_id, template_id, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | documents.document_id = paragraphs.document_id | | select document_id , template_id , document_description from documents where document_name = 'Robbin CV' |
304 | cre_Doc_Template_Mgt | Return the document id, template id, and description for the document with the name Robbin CV. | | documents: document_name, document_id, template_id, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: document_id, paragraph_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | paragraphs.document_id = documents.document_id | | select document_id , template_id , document_description from documents where document_name = 'Robbin CV' |
305 | cre_Doc_Template_Mgt | How many different templates do all document use? | | ref_template_types: template_type_code | templates: template_type_code, template_id | documents: template_id | paragraphs: | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | | select count ( distinct template_id ) from documents |
306 | 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, template_type_code, version_number, date_effective_from, date_effective_to, template_details | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | | select count ( distinct template_id ) from documents |
307 | cre_Doc_Template_Mgt | How many documents are using the template with type code 'PPT'? | | ref_template_types: template_type_code | templates: template_id, template_type_code | documents: template_id, document_id | paragraphs: | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT' |
308 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | | select count ( * ) from documents join templates on documents.template_id = templates.template_id where templates.template_type_code = 'PPT' |
309 | cre_Doc_Template_Mgt | Show all template ids and number of documents using each template. | | templates: template_id, template_type_code | documents: template_id | ref_template_types: template_type_code | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | | select template_id , count ( * ) from documents group by template_id |
310 | cre_Doc_Template_Mgt | What are all different template ids used for documents, and how many times were each of them used? | | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | ref_template_types: template_type_code, template_type_description | 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 |
311 | 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, template_type_code, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
312 | 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, template_type_code, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | | 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 |
313 | cre_Doc_Template_Mgt | Show ids for all templates that are used by more than one document. | | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | ref_template_types: template_type_code, template_type_description | paragraphs: document_id, paragraph_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 |
314 | cre_Doc_Template_Mgt | What are the template ids of any templates used in more than a single document? | | templates: template_id, template_type_code , date_effective_from , date_effective_to , template_details, version_number | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id , paragraph_text , other_details | ref_template_types: template_type_code , template_type_description | 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 |
315 | 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, template_type_code, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_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 |
316 | cre_Doc_Template_Mgt | What are the ids for templates that are not used in any documents? | | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | ref_template_types: template_type_code, template_type_description | paragraphs: document_id, paragraph_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | paragraphs.document_id = documents.document_id | | select template_id from templates except select template_id from documents |
317 | cre_Doc_Template_Mgt | How many templates do we have? | | ref_template_types: template_type_code, template_type_description | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
318 | cre_Doc_Template_Mgt | Count the number of templates. | | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
319 | cre_Doc_Template_Mgt | Show template ids, version numbers, and template type codes for all templates. | | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | 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 |
320 | cre_Doc_Template_Mgt | What are the ids, version numbers, and type codes for each template? | | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | 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 |
321 | cre_Doc_Template_Mgt | Show all distinct template type codes for all templates. | | ref_template_types: template_type_code, template_type_description | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
322 | cre_Doc_Template_Mgt | What are the different template type codes? | | ref_template_types: template_type_code, template_type_description | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
323 | cre_Doc_Template_Mgt | What are the ids of templates with template type code PP or PPT? | | templates: template_id, template_type_code | ref_template_types: template_type_code | | select template_id from templates where template_type_code = 'PP' or template_type_code = 'PPT' |
324 | cre_Doc_Template_Mgt | Return the ids of templates that have the code PP or PPT. | | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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' |
325 | cre_Doc_Template_Mgt | How many templates have template type code CV? | | ref_template_types: template_type_code, template_type_description | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: | | select count ( * ) from templates where template_type_code = 'CV' |
326 | cre_Doc_Template_Mgt | Count the number of templates of the type CV. | | ref_template_types: template_type_code, template_type_description | templates: template_type_code, template_id, version_number, 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 | | select count ( * ) from templates where template_type_code = 'CV' |
327 | 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: version_number, template_type_code, template_id, 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 |
328 | cre_Doc_Template_Mgt | Return the version numbers and template type codes of templates with a version number greater than 5. | | templates: version_number, template_type_code | ref_template_types: template_type_code | | select version_number , template_type_code from templates where version_number > 5 |
329 | 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_type_code, template_id, date_effective_from, date_effective_to, template_details, version_number | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
330 | cre_Doc_Template_Mgt | What are the different template type codes, and how many templates correspond to each? | | ref_template_types: template_type_code | templates: template_type_code, template_id | documents | paragraphs | 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 |
331 | cre_Doc_Template_Mgt | Which template type code has most number of templates? | | ref_template_types: template_type_code, template_type_description | templates: template_type_code, template_id, version_number, 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 |
332 | cre_Doc_Template_Mgt | Return the type code of the template type that the most templates belong to. | | templates: template_type_code, template_id | ref_template_types: template_type_code, template_type_description | documents: template_id | | select template_type_code from templates group by template_type_code order by count ( * ) desc limit 1 |
333 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_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 |
334 | 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_type_code, template_id, version_number, 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 |
335 | cre_Doc_Template_Mgt | What the smallest version number and its template type code? | | templates: version_number, template_type_code, template_id, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
336 | 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: version_number, template_type_code, template_id, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
337 | cre_Doc_Template_Mgt | What is the template type code of the template used by document with the name "Data base"? | | documents: document_name, template_id, document_id, document_description, other_details | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | 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' |
338 | cre_Doc_Template_Mgt | Return the template type code of the template that is used by a document named Data base. | | documents: document_name, template_id, document_id, document_description, other_details | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | 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' |
339 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_name, document_id, document_description, other_details | paragraphs: document_id, paragraph_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' |
340 | cre_Doc_Template_Mgt | What are the names of documents that use templates with the code BK? | | ref_template_types: template_type_code | templates: template_type_code, template_id | documents: template_id, document_name | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | | select documents.document_name from templates join documents on templates.template_id = documents.template_id where templates.template_type_code = 'BK' |
341 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
342 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_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 |
343 | cre_Doc_Template_Mgt | Which template type code is used by most number of documents? | | templates: template_type_code, template_id | documents: template_id, document_id | ref_template_types: template_type_code, template_type_description | 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 |
344 | 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_type_code, template_id, date_effective_from, date_effective_to, version_number, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
345 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_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 |
346 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_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 |
347 | cre_Doc_Template_Mgt | Show all template type codes and descriptions. | | ref_template_types: template_type_code, template_type_description | templates: template_type_code, template_id, version_number, 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 |
348 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
349 | 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_type_code | documents: irrelevant | paragraphs: irrelevant | 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' |
350 | 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_type_code | documents: template_id | paragraphs: document_id | | select template_type_description from ref_template_types where template_type_code = 'AD' |
351 | cre_Doc_Template_Mgt | What is the template type code for template type description "Book". | | ref_template_types: template_type_description, template_type_code | templates: template_type_code | | select template_type_code from ref_template_types where template_type_description = 'Book' |
352 | cre_Doc_Template_Mgt | Return the type code of the template type with the description "Book". | | ref_template_types: template_type_description, template_type_code | templates: template_type_code | documents: | paragraphs: | | select template_type_code from ref_template_types where template_type_description = 'Book' |
353 | cre_Doc_Template_Mgt | What are the distinct template type descriptions for the templates ever used by any document? | | ref_template_types: template_type_description, template_type_code | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
354 | 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_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_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 |
355 | 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, template_type_code, version_number, 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' |
356 | cre_Doc_Template_Mgt | Return the ids corresponding to templates with the description 'Presentation'. | | ref_template_types: template_type_description, template_type_code | templates: template_type_code, template_id, version_number, date_effective_from, date_effective_to, template_details | documents: template_id, document_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | | 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' |
357 | cre_Doc_Template_Mgt | How many paragraphs in total? | | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | condensed_tables: paragraphs.document_id = documents.document_id, documents.template_id = templates.template_id, templates.template_type_code = ref_template_types.template_type_code | | select count ( * ) from paragraphs |
358 | cre_Doc_Template_Mgt | Count the number of paragraphs. | | paragraphs: document_id, paragraph_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | templates.template_type_code = ref_template_types.template_type_code | | select count ( * ) from paragraphs |
359 | cre_Doc_Template_Mgt | How many paragraphs for the document with name 'Summer Show'? | | documents: document_name, document_id | paragraphs: document_id, paragraph_id | templates: template_id | ref_template_types: template_type_code | | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show' |
360 | cre_Doc_Template_Mgt | Count the number of paragraphs in the document named 'Summer Show'. | | documents: document_name, document_id | paragraphs: paragraph_id, document_id | templates: template_id | ref_template_types: template_type_code | | select count ( * ) from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Summer Show' |
361 | cre_Doc_Template_Mgt | Show paragraph details for paragraph with text 'Korea ' . | | paragraphs: paragraph_text, paragraph_id, document_id, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | | select other_details from paragraphs where paragraph_text like 'korea' |
362 | cre_Doc_Template_Mgt | What are the details for the paragraph that includes the text 'Korea ' ? | | paragraphs: paragraph_text, paragraph_id, other_details, document_id | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs.document_id = documents.document_id | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | | select other_details from paragraphs where paragraph_text like 'korea' |
363 | cre_Doc_Template_Mgt | Show all paragraph ids and texts for the document with name 'Welcome to NY'. | | documents: document_name, document_id, template_id, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | templates.template_type_code = ref_template_types.template_type_code | | 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' |
364 | cre_Doc_Template_Mgt | What are the ids and texts of paragraphs in the document titled 'Welcome to NY'? | | documents: document_name, document_id, template_id, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | - Keys: 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' |
365 | cre_Doc_Template_Mgt | Show all paragraph texts for the document "Customer reviews". | | documents: document_name, document_id, template_id, document_description, other_details | paragraphs: paragraph_text, document_id, paragraph_id, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | templates.template_type_code = ref_template_types.template_type_code | | select paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Customer reviews' |
366 | cre_Doc_Template_Mgt | What are the paragraph texts for the document with the name 'Customer reviews'? | | documents: document_name, document_id, template_id, document_description, other_details | paragraphs: document_id, paragraph_text, paragraph_id, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | templates.template_type_code = ref_template_types.template_type_code | | select paragraphs.paragraph_text from paragraphs join documents on paragraphs.document_id = documents.document_id where documents.document_name = 'Customer reviews' |
367 | cre_Doc_Template_Mgt | Show all document ids and the number of paragraphs in each document. Order by document id. | | documents: document_id | paragraphs: document_id, paragraph_id | | select document_id , count ( * ) from paragraphs group by document_id order by document_id asc |
368 | cre_Doc_Template_Mgt | Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. | | documents: document_id, template_id | paragraphs: document_id, paragraph_id | templates: template_id, template_type_code | ref_template_types: template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | templates.template_type_code = ref_template_types.template_type_code | paragraphs: paragraph_text, other_details | documents: document_name, document_description, other_details | templates: version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_description | | select document_id , count ( * ) from paragraphs group by document_id order by document_id asc |
369 | cre_Doc_Template_Mgt | Show all document ids, names and the number of paragraphs in each document. | | documents: document_id, document_name | paragraphs: document_id, paragraph_id | templates: template_id | ref_template_types: template_type_code | 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 |
370 | cre_Doc_Template_Mgt | What are the ids and names of each document, as well as the number of paragraphs in each? | | documents: document_id, document_name, template_id | paragraphs: paragraph_id, document_id | templates: template_id | ref_template_types: template_type_code | 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 |
371 | cre_Doc_Template_Mgt | List all document ids with at least two paragraphs. | | documents: document_id, template_id | paragraphs: document_id, paragraph_id | templates: template_id, template_type_code | ref_template_types: template_type_code | | select document_id from paragraphs group by document_id having count ( * ) >= 2 |
372 | cre_Doc_Template_Mgt | What are the ids of documents that have 2 or more paragraphs? | | documents: document_id, template_id, document_name, document_description, other_details | paragraphs: document_id, paragraph_id, paragraph_text, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | 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 |
373 | 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, template_type_code, version_number, 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 |
374 | cre_Doc_Template_Mgt | Return the id and name of the document with the most paragraphs. | | paragraphs: document_id, paragraph_id, paragraph_text, other_details | documents: document_id, document_name, template_id, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs.document_id = documents.document_id | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | | 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 |
375 | cre_Doc_Template_Mgt | What is the document id with least number of paragraphs? | | paragraphs: document_id, paragraph_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | 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 |
376 | cre_Doc_Template_Mgt | Return the id of the document with the fewest paragraphs. | | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs.document_id = documents.document_id | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | | select document_id from paragraphs group by document_id order by count ( * ) asc limit 1 |
377 | cre_Doc_Template_Mgt | What is the document id with 1 to 2 paragraphs? | | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | paragraphs: document_id, paragraph_text, paragraph_id, other_details | ref_template_types: template_type_code, template_type_description | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | templates.template_type_code = ref_template_types.template_type_code | | select document_id from paragraphs group by document_id having count ( * ) between 1 and 2 |
378 | cre_Doc_Template_Mgt | Give the ids of documents that have between one and two paragraphs. | | ref_template_types: | templates: template_id | documents: document_id, template_id | paragraphs: document_id | 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 |
379 | cre_Doc_Template_Mgt | Show the document id with paragraph text 'Brazil' and 'Ireland'. | | paragraphs: paragraph_text, document_id, paragraph_id, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs.document_id = documents.document_id | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland' |
380 | cre_Doc_Template_Mgt | What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'? | | paragraphs: paragraph_text, document_id, paragraph_id, other_details | documents: document_id, template_id, document_name, document_description, other_details | templates: template_id | ref_template_types: | paragraphs.document_id = documents.document_id | documents.template_id = templates.template_id | | select document_id from paragraphs where paragraph_text = 'Brazil' intersect select document_id from paragraphs where paragraph_text = 'Ireland' |
381 | course_teach | How many teachers are there? | | teacher: teacher_id, name, age, hometown | course: course_id, starting_date, course | 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 |
382 | course_teach | What is the total count of teachers? | | teacher: teacher_id, name, age, hometown | course: course_id, staring_date, course | course_arrange: course_id, teacher_id, grade | | select count ( * ) from teacher |
383 | course_teach | List the names of teachers in ascending order of age. | | teacher: age, name, teacher_id, hometown | course_arrange: teacher_id | course: course_id, staring_date, course | | select name from teacher order by age asc |
384 | course_teach | What are the names of the teachers ordered by ascending age? | | teacher: age, name, teacher_id, hometown | course: course_id, staring_date, course | course_arrange: teacher_id, course_id, grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | | select name from teacher order by age asc |
385 | course_teach | What are the age and hometown of teachers? | | teacher: age, hometown, teacher_id, name | course: course_id, staring_date, course | course_arrange: teacher_id, course_id, grade | course_arrange.course_id=course.course_id | course_arrange.teacher_id=teacher.teacher_id | | select age , hometown from teacher |
386 | course_teach | What is the age and hometown of every teacher? | | teacher: age, hometown, teacher_id, name | course_arrange: teacher_id, course_id, grade | course: course_id, staring_date, course | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | | select age , hometown from teacher |
387 | course_teach | List the name of teachers whose hometown is not `` Little Lever Urban District '' . | | teacher: hometown, name, teacher_id, age | course: course_id, staring_date, course | course_arrange: teacher_id, course_id, grade | | select name from teacher where hometown != 'little lever urban district' |
388 | course_teach | What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ? | | teacher: hometown, name, teacher_id | course: course_id, staring_date, course | 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' |
389 | course_teach | Show the name of teachers aged either 32 or 33? | | teacher: name, age, teacher_id, hometown | course: course_id, starting_date, course | course_arrange: teacher_id, course_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 |
390 | course_teach | What are the names of the teachers who are aged either 32 or 33? | | teacher: name, age, teacher_id, hometown | course_arrange: teacher_id, course_id, grade | course: course_id, staring_date, course | | select name from teacher where age = 32 or age = 33 |
391 | course_teach | What is the hometown of the youngest teacher? | | teacher: age, hometown, teacher_id, name | course_arrange: teacher_id, course_id, grade | course: course_id, staring_date, course | | select hometown from teacher order by age asc limit 1 |
392 | course_teach | Where is the youngest teacher from? | | teacher: age, hometown, teacher_id, name | course_arrange: teacher_id, course_id, grade | course: course_id, staring_date, course | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | | select hometown from teacher order by age asc limit 1 |
393 | course_teach | Show different hometown of teachers and the number of teachers from each hometown. | | teacher: hometown, teacher_id, name, age | course_arrange: teacher_id, course_id, grade | course : course_id , staring_date , course | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | | select hometown , count ( * ) from teacher group by hometown |
394 | course_teach | For each hometown, how many teachers are there? | | teacher: hometown, teacher_id, name, age | course_arrange: teacher_id, course_id, grade | course: course_id, staring_date, course | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | | select hometown , count ( * ) from teacher group by hometown |
395 | course_teach | List the most common hometown of teachers. | | teacher: hometown, teacher_id | course_arrange: teacher_id | course: course_id, staring_date, course | 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 |
396 | course_teach | What is the most commmon hometowns for teachers? | | teacher: hometown, teacher_id, name, age | course: course_id | course_arrange: teacher_id, course_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 |
397 | course_teach | Show the hometowns shared by at least two teachers. | | teacher: hometown, teacher_id, name, age | course_arrange: teacher_id, course_id, grade | course: course_id, staring_date, course | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | | select hometown from teacher group by hometown having count ( * ) >= 2 |
398 | course_teach | What are the towns from which at least two teachers come from? | | teacher: hometown, teacher_id, name, age | course_arrange: teacher_id, course_id, grade | course: course_id, course, staring_date | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | | select hometown from teacher group by hometown having count ( * ) >= 2 |
399 | course_teach | Show names of teachers and the courses they are arranged to teach. | | teacher: name, teacher_id, age, hometown | course: course, course_id, staring_date | course_arrange: teacher_id, course_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 |