Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the codes of template types that have fewer than 3 templates?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3</SQL_QUERY>

Question: SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*)  <  3

Question: What are the codes of template types that have fewer than 3 templates?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What the smallest version number and its template type code?</question>
[SQL]:

Output: <SQL_QUERY>SELECT min(Version_Number) ,  template_type_code FROM Templates</SQL_QUERY>

Question: SELECT min(Version_Number) ,  template_type_code FROM Templates

Question: What the smallest version number and its template type code?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the lowest version number, along with its corresponding template type code.</question>
[SQL]:

Output: <SQL_QUERY>SELECT min(Version_Number) ,  template_type_code FROM Templates</SQL_QUERY>

Question: SELECT min(Version_Number) ,  template_type_code FROM Templates

Question: Return the lowest version number, along with its corresponding template type code.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the template type code of the template used by document with the name "Data base"?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"</SQL_QUERY>

Question: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"

Question: What is the template type code of the template used by document with the name "Data base"?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the template type code of the template that is used by a document named Data base.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"</SQL_QUERY>

Question: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T2.document_name  =  "Data base"

Question: Return the template type code of the template that is used by a document named Data base.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all document names using templates with template type code BK.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"</SQL_QUERY>

Question: SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"

Question: Show all document names using templates with template type code BK.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of documents that use templates with the code BK?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"</SQL_QUERY>

Question: SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id WHERE T1.template_type_code  =  "BK"

Question: What are the names of documents that use templates with the code BK?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all template type codes and the number of documents using each type.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code</SQL_QUERY>

Question: SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code

Question: Show all template type codes and the number of documents using each type.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different template type codes, and how many documents use each type?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code</SQL_QUERY>

Question: SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code

Question: What are the different template type codes, and how many documents use each type?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which template type code is used by most number of documents?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1

Question: Which template type code is used by most number of documents?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the code of the template type that is most commonly used in documents.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1

Question: Return the code of the template type that is most commonly used in documents.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all template type codes that are not used by any document.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id</SQL_QUERY>

Question: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id

Question: Show all template type codes that are not used by any document.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the codes of template types that are not used for any document?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id</SQL_QUERY>

Question: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id

Question: What are the codes of template types that are not used for any document?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all template type codes and descriptions.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code ,  template_type_description FROM Ref_template_types</SQL_QUERY>

Question: SELECT template_type_code ,  template_type_description FROM Ref_template_types

Question: Show all template type codes and descriptions.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the type codes and descriptions for all template types?</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code ,  template_type_description FROM Ref_template_types</SQL_QUERY>

Question: SELECT template_type_code ,  template_type_description FROM Ref_template_types

Question: What are the type codes and descriptions for all template types?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the template type descriptions for template type code "AD".</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"</SQL_QUERY>

Question: SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"

Question: What is the template type descriptions for template type code "AD".


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the template type description of the template type with the code AD.</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"</SQL_QUERY>

Question: SELECT template_type_description FROM Ref_template_types WHERE template_type_code  =  "AD"

Question: Return the template type description of the template type with the code AD.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the template type code for template type description "Book".</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"</SQL_QUERY>

Question: SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"

Question: What is the template type code for template type description "Book".


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the type code of the template type with the description "Book".</question>
[SQL]:

Output: <SQL_QUERY>SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"</SQL_QUERY>

Question: SELECT template_type_code FROM Ref_template_types WHERE template_type_description  =  "Book"

Question: Return the type code of the template type with the description "Book".


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the distinct template type descriptions for the templates ever used by any document?</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID  =  T3.template_ID</SQL_QUERY>

Question: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID  =  T3.template_ID

Question: What are the distinct template type descriptions for the templates ever used by any document?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the different descriptions for templates that have been used in a document.</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID  =  T3.template_ID</SQL_QUERY>

Question: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID  =  T3.template_ID

Question: Return the different descriptions for templates that have been used in a document.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the template ids with template type description "Presentation".</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code WHERE T1.template_type_description  =  "Presentation"</SQL_QUERY>

Question: SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code WHERE T1.template_type_description  =  "Presentation"

Question: What are the template ids with template type description "Presentation".


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the ids corresponding to templates with the description 'Presentation'.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code WHERE T1.template_type_description  =  "Presentation"</SQL_QUERY>

Question: SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code WHERE T1.template_type_description  =  "Presentation"

Question: Return the ids corresponding to templates with the description 'Presentation'.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many paragraphs in total?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Paragraphs</SQL_QUERY>

Question: SELECT count(*) FROM Paragraphs

Question: How many paragraphs in total?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of paragraphs.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Paragraphs</SQL_QUERY>

Question: SELECT count(*) FROM Paragraphs

Question: Count the number of paragraphs.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many paragraphs for the document with name 'Summer Show'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID  =  T2.document_ID WHERE T2.document_name  =  'Summer Show'</SQL_QUERY>

Question: SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID  =  T2.document_ID WHERE T2.document_name  =  'Summer Show'

Question: How many paragraphs for the document with name 'Summer Show'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Count the number of paragraphs in the document named 'Summer Show'.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID  =  T2.document_ID WHERE T2.document_name  =  'Summer Show'</SQL_QUERY>

Question: SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID  =  T2.document_ID WHERE T2.document_name  =  'Summer Show'

Question: Count the number of paragraphs in the document named 'Summer Show'.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show paragraph details for paragraph with text 'Korea ' .</question>
[SQL]:

Output: <SQL_QUERY>select other_details from paragraphs where paragraph_text like 'korea'</SQL_QUERY>

Question: select other_details from paragraphs where paragraph_text like 'korea'

Question: Show paragraph details for paragraph with text 'Korea ' .


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the details for the paragraph that includes the text 'Korea ' ?</question>
[SQL]:

Output: <SQL_QUERY>select other_details from paragraphs where paragraph_text like 'korea'</SQL_QUERY>

Question: select other_details from paragraphs where paragraph_text like 'korea'

Question: What are the details for the paragraph that includes the text 'Korea ' ?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all paragraph ids and texts for the document with name 'Welcome to NY'.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.paragraph_id ,   T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.Document_Name  =  'Welcome to NY'</SQL_QUERY>

Question: SELECT T1.paragraph_id ,   T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.Document_Name  =  'Welcome to NY'

Question: Show all paragraph ids and texts for the document with name 'Welcome to NY'.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.paragraph_id ,   T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.Document_Name  =  'Welcome to NY'</SQL_QUERY>

Question: SELECT T1.paragraph_id ,   T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.Document_Name  =  'Welcome to NY'

Question: What are the ids and texts of paragraphs in the document titled 'Welcome to NY'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all paragraph texts for the document "Customer reviews".</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.document_name  =  "Customer reviews"</SQL_QUERY>

Question: SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.document_name  =  "Customer reviews"

Question: Show all paragraph texts for the document "Customer reviews".


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the paragraph texts for the document with the name 'Customer reviews'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.document_name  =  "Customer reviews"</SQL_QUERY>

Question: SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.document_name  =  "Customer reviews"

Question: What are the paragraph texts for the document with the name 'Customer reviews'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all document ids and the number of paragraphs in each document. Order by document id.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id ,  count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id</SQL_QUERY>

Question: SELECT document_id ,  count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id

Question: Show all document ids and the number of paragraphs in each document. Order by document id.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id ,  count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id</SQL_QUERY>

Question: SELECT document_id ,  count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id

Question: Return the different document ids along with the number of paragraphs corresponding to each, ordered by id.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show all document ids, names and the number of paragraphs in each document.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.document_id ,  T2.document_name ,  count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id</SQL_QUERY>

Question: SELECT T1.document_id ,  T2.document_name ,  count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id

Question: Show all document ids, names and the number of paragraphs in each document.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids and names of each document, as well as the number of paragraphs in each?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.document_id ,  T2.document_name ,  count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id</SQL_QUERY>

Question: SELECT T1.document_id ,  T2.document_name ,  count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id

Question: What are the ids and names of each document, as well as the number of paragraphs in each?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List all document ids with at least two paragraphs.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*)  >=  2</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*)  >=  2

Question: List all document ids with at least two paragraphs.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids of documents that have 2 or more paragraphs?</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*)  >=  2</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*)  >=  2

Question: What are the ids of documents that have 2 or more paragraphs?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the document id and name with greatest number of paragraphs?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.document_id ,  T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT T1.document_id ,  T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1

Question: What is the document id and name with greatest number of paragraphs?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the id and name of the document with the most paragraphs.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.document_id ,  T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT T1.document_id ,  T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1

Question: Return the id and name of the document with the most paragraphs.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the document id with least number of paragraphs?</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1

Question: What is the document id with least number of paragraphs?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Return the id of the document with the fewest paragraphs.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1

Question: Return the id of the document with the fewest paragraphs.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the document id with 1 to 2 paragraphs?</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2

Question: What is the document id with 1 to 2 paragraphs?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Give the ids of documents that have between one and two paragraphs.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2

Question: Give the ids of documents that have between one and two paragraphs.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the document id with paragraph text 'Brazil' and 'Ireland'.</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Ireland'</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Ireland'

Question: Show the document id with paragraph text 'Brazil' and 'Ireland'.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | cre_Doc_Template_Mgt |  Ref_Template_Types : template_type_code (text) , template_type_description (text) | Templates : template_id (text) , version_number (text) , template_type_code (text) , date_effective_from (number) , date_effective_to (number) , template_details (text) | Documents : document_id (text) , template_id (text) , document_name (text) , document_description (number) , other_details (number) | Paragraphs : paragraph_id (text) , document_id (text) , paragraph_text (text) , other_details (number);</schema>"
<primary_keys>[Primary Keys]: ref_template_types : template_type_code, templates : template_id, documents : document_id, paragraphs : paragraph_id</primary_keys>"
<foreign_keys>[Foreign Keys]: templates : template_type_code = ref_template_types : template_type_code | documents : template_id = templates : template_id | paragraphs : document_id = documents : document_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Ireland'</SQL_QUERY>

Question: SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Ireland'

Question: What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many teachers are there?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM teacher</SQL_QUERY>

Question: SELECT count(*) FROM teacher

Question: How many teachers are there?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the total count of teachers?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM teacher</SQL_QUERY>

Question: SELECT count(*) FROM teacher

Question: What is the total count of teachers?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the names of teachers in ascending order of age.</question>
[SQL]:

Output: <SQL_QUERY>SELECT Name FROM teacher ORDER BY Age ASC</SQL_QUERY>

Question: SELECT Name FROM teacher ORDER BY Age ASC

Question: List the names of teachers in ascending order of age.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the teachers ordered by ascending age?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Name FROM teacher ORDER BY Age ASC</SQL_QUERY>

Question: SELECT Name FROM teacher ORDER BY Age ASC

Question: What are the names of the teachers ordered by ascending age?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the age and hometown of teachers?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Age ,  Hometown FROM teacher</SQL_QUERY>

Question: SELECT Age ,  Hometown FROM teacher

Question: What are the age and hometown of teachers?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the age and hometown of every teacher?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Age ,  Hometown FROM teacher</SQL_QUERY>

Question: SELECT Age ,  Hometown FROM teacher

Question: What is the age and hometown of every teacher?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name of teachers whose hometown is not `` Little Lever Urban District '' .</question>
[SQL]:

Output: <SQL_QUERY>select name from teacher where hometown != "little lever urban district"</SQL_QUERY>

Question: select name from teacher where hometown != "little lever urban district"

Question: List the name of teachers whose hometown is not `` Little Lever Urban District '' .


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?</question>
[SQL]:

Output: <SQL_QUERY>select name from teacher where hometown != "little lever urban district"</SQL_QUERY>

Question: select name from teacher where hometown != "little lever urban district"

Question: What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the name of teachers aged either 32 or 33?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33</SQL_QUERY>

Question: SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33

Question: Show the name of teachers aged either 32 or 33?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the teachers who are aged either 32 or 33?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33</SQL_QUERY>

Question: SELECT Name FROM teacher WHERE Age  =  32 OR Age  =  33

Question: What are the names of the teachers who are aged either 32 or 33?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the hometown of the youngest teacher?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1</SQL_QUERY>

Question: SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1

Question: What is the hometown of the youngest teacher?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Where is the youngest teacher from?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1</SQL_QUERY>

Question: SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1

Question: Where is the youngest teacher from?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show different hometown of teachers and the number of teachers from each hometown.</question>
[SQL]:

Output: <SQL_QUERY>SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown</SQL_QUERY>

Question: SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown

Question: Show different hometown of teachers and the number of teachers from each hometown.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>For each hometown, how many teachers are there?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown</SQL_QUERY>

Question: SELECT Hometown ,  COUNT(*) FROM teacher GROUP BY Hometown

Question: For each hometown, how many teachers are there?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the most common hometown of teachers.</question>
[SQL]:

Output: <SQL_QUERY>SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1

Question: List the most common hometown of teachers.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the most commmon hometowns for teachers?</question>
[SQL]:

Output: <SQL_QUERY>SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1

Question: What is the most commmon hometowns for teachers?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | course_teach |  course : course_id (text) , staring_date (number) , course (text) | teacher : teacher_id (text) , name (number) , age (text) , hometown (text) | course_arrange : course_id (text) , teacher_id (number) , grade (text);</schema>"
<primary_keys>[Primary Keys]: course : course_id, teacher : teacher_id, course_arrange : course_id</primary_keys>"
<foreign_keys>[Foreign Keys]: course_arrange : teacher_id = teacher : teacher_id | course_arrange : course_id = course : course_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show the hometowns shared by at least two teachers.</question>
[SQL]:

Output: <SQL_QUERY>SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2</SQL_QUERY>

Question: SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*)  >=  2

Question: Show the hometowns shared by at least two teachers.