richardr1126/spider-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: What is the structure of the document with the least number of accesses? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_structures.document_structure_description from documents join document_structures on documents.document_structure_code = document_structures.document_structure_code group by documents.document_structure_code order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Return the structure description of the document that has been accessed the fewest number of times. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_structures.document_structure_description from documents join document_structures on documents.document_structure_code = document_structures.document_structure_code group by documents.document_structure_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the type of the document named "David CV"? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_type_code from documents where document_name = 'David CV'

### Instruction:

Convert text to sql: Return the type code of the document named "David CV". | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_type_code from documents where document_name = 'David CV'
### Instruction:

Convert text to sql: Find the list of documents that are both in the most three popular type and have the most three popular structure. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_name from documents group by document_type_code order by count ( * ) desc limit 3 intersect select document_name from documents group by document_structure_code order by count ( * ) desc limit 3

### Instruction:

Convert text to sql: What are the names of documents that have both one of the three most common types and one of three most common structures? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_name from documents group by document_type_code order by count ( * ) desc limit 3 intersect select document_name from documents group by document_structure_code order by count ( * ) desc limit 3
### Instruction:

Convert text to sql: What document types do have more than 10000 total access number. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_type_code from documents group by document_type_code having sum ( access_count ) > 10000

### Instruction:

Convert text to sql: Return the codes of the document types that do not have a total access count of over 10000. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_type_code from documents group by document_type_code having sum ( access_count ) > 10000
### Instruction:

Convert text to sql: What are all the section titles of the document named "David CV"? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_sections.section_title from documents join document_sections on documents.document_code = document_sections.document_code where documents.document_name = 'David CV'

### Instruction:

Convert text to sql: Give the section titles of the document with the name "David CV". | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_sections.section_title from documents join document_sections on documents.document_code = document_sections.document_code where documents.document_name = 'David CV'
### Instruction:

Convert text to sql: Find all the name of documents without any sections. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_name from documents where document_code not in ( select document_code from document_sections )

### Instruction:

Convert text to sql: What are the names of documents that do not have any sections? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select document_name from documents where document_code not in ( select document_code from document_sections )
### Instruction:

Convert text to sql: List all the username and passwords of users with the most popular role. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select user_name , password from users group by role_code order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What are the usernames and passwords of users that have the most common role? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select user_name , password from users group by role_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the average access counts of documents with functional area "Acknowledgement". | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select avg ( documents.access_count ) from documents join document_functional_areas on documents.document_code = document_functional_areas.document_code join functional_areas on document_functional_areas.functional_area_code = functional_areas.functional_area_code where functional_areas.functional_area_description = 'Acknowledgement'
### Instruction:

Convert text to sql: What are the average access counts of documents that have the functional area description "Acknowledgement"? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | 

### Response:

select avg ( documents.access_count ) from documents join document_functional_areas on documents.document_code = document_functional_areas.document_code join functional_areas on document_functional_areas.functional_area_code = functional_areas.functional_area_code where functional_areas.functional_area_description = 'Acknowledgement'