richardr1126/spider-natsql-context-validation huggingface dataset:
### Instruction:

Convert text to NatSQL: Return the ids of templates that have the code PP or PPT. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_ID from templates  where  templates.Template_Type_Code = "PP"  or  templates.Template_Type_Code = "PPT"

### Instruction:

Convert text to NatSQL: How many templates have template type code CV? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select count ( templates.* )  from templates  where  templates.Template_Type_Code = "CV"

### Instruction:

Convert text to NatSQL: Count the number of templates of the type CV. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select count ( templates.* )  from templates  where  templates.Template_Type_Code = "CV"

### Instruction:

Convert text to NatSQL: What is the version number and template type code for the template with version number later than 5? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Version_Number , templates.Template_Type_Code from templates  where  templates.Version_Number > 5
### Instruction:

Convert text to NatSQL: Return the version numbers and template type codes of templates with a version number greater than 5. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Version_Number , templates.Template_Type_Code from templates  where  templates.Version_Number > 5

### Instruction:

Convert text to NatSQL: Show all template type codes and number of templates for each. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code , count ( templates.* )  from templates  group by templates.Template_Type_Code

### Instruction:

Convert text to NatSQL: What are the different template type codes, and how many templates correspond to each? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code , count ( templates.* )  from templates  group by templates.Template_Type_Code

### Instruction:

Convert text to NatSQL: Which template type code has most number of templates? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  group by templates.Template_Type_Code  order by count ( templates.* )  desc limit 1
### Instruction:

Convert text to NatSQL: Return the type code of the template type that the most templates belong to. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  group by templates.Template_Type_Code  order by count ( templates.* )  desc limit 1

### Instruction:

Convert text to NatSQL: Show all template type codes with less than three templates. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  where  count ( templates.* )  < 3  group by templates.Template_Type_Code

### Instruction:

Convert text to NatSQL: What are the codes of template types that have fewer than 3 templates? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  where  count ( templates.* )  < 3  group by templates.Template_Type_Code

### Instruction:

Convert text to NatSQL: What the smallest version number and its template type code? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select min(templates.Version_Number) , templates.Template_Type_Code from templates
### Instruction:

Convert text to NatSQL: Return the lowest version number, along with its corresponding template type code. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select min(templates.Version_Number) , templates.Template_Type_Code from templates

### Instruction:

Convert text to NatSQL: What is the template type code of the template used by document with the name "Data base"? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  where  documents.Document_Name = "Data base"

### Instruction:

Convert text to NatSQL: Return the template type code of the template that is used by a document named Data base. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  where  documents.Document_Name = "Data base"

### Instruction:

Convert text to NatSQL: Show all document names using templates with template type code BK. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select documents.Document_Name from templates  where  templates.Template_Type_Code = "BK"
### Instruction:

Convert text to NatSQL: What are the names of documents that use templates with the code BK? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select documents.Document_Name from templates  where  templates.Template_Type_Code = "BK"

### Instruction:

Convert text to NatSQL: Show all template type codes and the number of documents using each type. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code , count ( documents.* )  from documents  group by templates.Template_Type_Code

### Instruction:

Convert text to NatSQL: What are the different template type codes, and how many documents use each type? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code , count ( documents.* )  from documents  group by templates.Template_Type_Code

### Instruction:

Convert text to NatSQL: Which template type code is used by most number of documents? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from documents  group by templates.Template_Type_Code  order by count ( documents.* )  desc limit 1
### Instruction:

Convert text to NatSQL: Return the code of the template type that is most commonly used in documents. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from documents  group by templates.Template_Type_Code  order by count ( documents.* )  desc limit 1

### Instruction:

Convert text to NatSQL: Show all template type codes that are not used by any document. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  where  except_  @.@ is documents.*

### Instruction:

Convert text to NatSQL: What are the codes of template types that are not used for any document? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_Type_Code from templates  where  except_  @.@ is documents.*

### Instruction:

Convert text to NatSQL: Show all template type codes and descriptions. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select ref_template_types.Template_Type_Code , ref_template_types.Template_Type_Description from ref_template_types
### Instruction:

Convert text to NatSQL: What are the type codes and descriptions for all template types? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select ref_template_types.Template_Type_Code , ref_template_types.Template_Type_Description from ref_template_types

### Instruction:

Convert text to NatSQL: What is the template type descriptions for template type code "AD". | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select ref_template_types.Template_Type_Description from ref_template_types  where  ref_template_types.Template_Type_Code = "AD"

### Instruction:

Convert text to NatSQL: Return the template type description of the template type with the code AD. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select ref_template_types.Template_Type_Description from ref_template_types  where  ref_template_types.Template_Type_Code = "AD"

### Instruction:

Convert text to NatSQL: What is the template type code for template type description "Book". | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select ref_template_types.Template_Type_Code from ref_template_types  where  ref_template_types.Template_Type_Description = "Book"
### Instruction:

Convert text to NatSQL: Return the type code of the template type with the description "Book". | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select ref_template_types.Template_Type_Code from ref_template_types  where  ref_template_types.Template_Type_Description = "Book"

### Instruction:

Convert text to NatSQL: What are the distinct template type descriptions for the templates ever used by any document? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select  distinct ref_template_types.Template_Type_Description from ref_template_types  where  @.@ join documents.*

### Instruction:

Convert text to NatSQL: Return the different descriptions for templates that have been used in a document. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select  distinct ref_template_types.Template_Type_Description from ref_template_types  where  @.@ join documents.*

### Instruction:

Convert text to NatSQL: What are the template ids with template type description "Presentation". | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_ID from ref_template_types  where  ref_template_types.Template_Type_Description = "Presentation"
### Instruction:

Convert text to NatSQL: Return the ids corresponding to templates with the description 'Presentation'. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select templates.Template_ID from templates  where  ref_template_types.Template_Type_Description = "Presentation"

### Instruction:

Convert text to NatSQL: How many paragraphs in total? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select count ( paragraphs.* )  from paragraphs

### Instruction:

Convert text to NatSQL: Count the number of paragraphs. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select count ( paragraphs.* )  from paragraphs

### Instruction:

Convert text to NatSQL: How many paragraphs for the document with name 'Summer Show'? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select count ( paragraphs.* )  from paragraphs  where  documents.Document_Name = "Summer Show"
### Instruction:

Convert text to NatSQL: Count the number of paragraphs in the document named 'Summer Show'. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select count ( paragraphs.* )  from paragraphs  where  documents.Document_Name = "Summer Show"

### Instruction:

Convert text to NatSQL: Show paragraph details for paragraph with text 'Korea ' . | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Other_Details from paragraphs  where  paragraphs.Paragraph_Text like "Korea"

### Instruction:

Convert text to NatSQL: What are the details for the paragraph that includes the text 'Korea ' ? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Other_Details from paragraphs  where  paragraphs.Paragraph_Text like "Korea"

### Instruction:

Convert text to NatSQL: Show all paragraph ids and texts for the document with name 'Welcome to NY'. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Paragraph_ID , paragraphs.Paragraph_Text from paragraphs  where  documents.Document_Name = "Welcome to NY"
### Instruction:

Convert text to NatSQL: What are the ids and texts of paragraphs in the document titled 'Welcome to NY'? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Paragraph_ID , paragraphs.Paragraph_Text from paragraphs  where  documents.Document_Name = "Welcome to NY"

### Instruction:

Convert text to NatSQL: Show all paragraph texts for the document "Customer reviews". | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Paragraph_Text from paragraphs  where  documents.Document_Name = "Customer reviews"

### Instruction:

Convert text to NatSQL: What are the paragraph texts for the document with the name 'Customer reviews'? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Paragraph_Text from paragraphs  where  documents.Document_Name = "Customer reviews"

### Instruction:

Convert text to NatSQL: Show all document ids and the number of paragraphs in each document. Order by document id. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID , count ( paragraphs.* )  from paragraphs  group by paragraphs.Document_ID  order by paragraphs.Document_ID asc
### Instruction:

Convert text to NatSQL: Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID , count ( paragraphs.* )  from paragraphs  group by paragraphs.Document_ID  order by paragraphs.Document_ID asc

### Instruction:

Convert text to NatSQL: Show all document ids, names and the number of paragraphs in each document. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID , documents.Document_Name , count ( paragraphs.* )  from paragraphs  group by paragraphs.Document_ID

### Instruction:

Convert text to NatSQL: What are the ids and names of each document, as well as the number of paragraphs in each? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID , documents.Document_Name , count ( paragraphs.* )  from paragraphs  group by paragraphs.Document_ID
### Instruction:

Convert text to NatSQL: List all document ids with at least two paragraphs. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  where  count ( paragraphs.* )  >= 2  group by paragraphs.Document_ID

### Instruction:

Convert text to NatSQL: What are the ids of documents that have 2 or more paragraphs? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  where  count ( paragraphs.* )  >= 2  group by paragraphs.Document_ID

### Instruction:

Convert text to NatSQL: What is the document id and name with greatest number of paragraphs? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select documents.Document_ID , documents.Document_Name from paragraphs  group by paragraphs.Document_ID  order by count ( paragraphs.* )  desc limit 1

### Instruction:

Convert text to NatSQL: Return the id and name of the document with the most paragraphs. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select documents.Document_ID , documents.Document_Name from paragraphs  group by paragraphs.Document_ID  order by count ( paragraphs.* )  desc limit 1
### Instruction:

Convert text to NatSQL: What is the document id with least number of paragraphs? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  group by paragraphs.Document_ID  order by count ( paragraphs.* )  asc limit 1

### Instruction:

Convert text to NatSQL: Return the id of the document with the fewest paragraphs. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  group by paragraphs.Document_ID  order by count ( paragraphs.* )  asc limit 1

### Instruction:

Convert text to NatSQL: What is the document id with 1 to 2 paragraphs? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  where  count ( paragraphs.* )  between 1 and 2  group by paragraphs.Document_ID

### Instruction:

Convert text to NatSQL: Give the ids of documents that have between one and two paragraphs. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  where  count ( paragraphs.* )  between 1 and 2  group by paragraphs.Document_ID
### Instruction:

Convert text to NatSQL: Show the document id with paragraph text 'Brazil' and 'Ireland'. | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  where  paragraphs.Paragraph_Text = "Brazil"  and  paragraphs.Paragraph_Text = "Ireland"

### Instruction:

Convert text to NatSQL: What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'? | ref_template_types : template_type_code , template_type_description | templates : template_id , version_number , template_type_code , date_effective_from , date_effective_to , template_details | documents : document_id , template_id , document_name , document_description , other_details | paragraphs : paragraph_id , document_id , paragraph_text , other_details | templates.template_type_code = ref_template_types.template_type_code | documents.template_id = templates.template_id | paragraphs.document_id = documents.document_id | 

### Response:

select paragraphs.Document_ID from paragraphs  where  paragraphs.Paragraph_Text = "Brazil"  and  paragraphs.Paragraph_Text = "Ireland"
### Instruction:

Convert text to NatSQL: How many teachers are there? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | 

### Response:

select count ( teacher.* )  from teacher

### Instruction:

Convert text to NatSQL: What is the total count of teachers? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | 

### Response:

select count ( teacher.* )  from teacher

### Instruction:

Convert text to NatSQL: List the names of teachers in ascending order of age. | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | 

### Response:

select teacher.Name from teacher  order by teacher.Age asc

### Instruction:

Convert text to NatSQL: What are the names of the teachers ordered by ascending age? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | 

### Response:

select teacher.Name from teacher  order by teacher.Age asc

### Instruction:

Convert text to NatSQL: What are the age and hometown of teachers? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | 

### Response:

select teacher.Age , teacher.Hometown from teacher

### Instruction:

Convert text to NatSQL: What is the age and hometown of every teacher? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | 

### Response:

select teacher.Age , teacher.Hometown from teacher

### Instruction:

Convert text to NatSQL: List the name of teachers whose hometown is not `` Little Lever Urban District '' . | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id | 

### Response:

select teacher.Name from teacher  where  teacher.Hometown != "little lever urban district"