db_id
stringlengths
4
31
text
stringlengths
398
4.9k
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all the documents, as well as the access counts of each, ordered alphabetically? | 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 _ from _ order by _ asc | select document_name , access_count from documents order by document_name asc
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed? | 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 _ from _ order by _ desc limit _ | select document_name , access_count from documents order by access_count desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed? | 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 _ from _ order by _ desc limit _ | select document_name , access_count from documents order by access_count desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the types of documents with more than 4 documents. | 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 _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 4
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the codes of types of documents of which there are for or more? | 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 _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 4
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the total access count of all documents in the most popular document type. | 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 sum ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select sum ( access_count ) from documents group by document_type_code order by count ( * ) desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total access count of documents that are of the most common document type? | 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 sum ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select sum ( access_count ) from documents group by document_type_code order by count ( * ) desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average access count of documents? | 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 ( _ ) from _ | select avg ( access_count ) from documents
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the average access count across all documents? | 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 ( _ ) from _ | select avg ( access_count ) from documents
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ order by count ( _ ) desc limit _ | 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
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ order by count ( _ ) desc limit _ | 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
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ where _ | select document_type_code from documents where document_name = 'David CV'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ where _ | select document_type_code from documents where document_name = 'David CV'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ order by count ( _ ) desc limit _ intersect select _ from _ group by _ order by count ( _ ) desc limit _ | 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
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ order by count ( _ ) desc limit _ intersect select _ from _ group by _ order by count ( _ ) desc limit _ | 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
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ having sum ( _ ) > _ | select document_type_code from documents group by document_type_code having sum ( access_count ) > 10000
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ having sum ( _ ) > _ | select document_type_code from documents group by document_type_code having sum ( access_count ) > 10000
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ where _ | select document_sections.section_title from documents join document_sections on documents.document_code = document_sections.document_code where documents.document_name = 'David CV'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ where _ | select document_sections.section_title from documents join document_sections on documents.document_code = document_sections.document_code where documents.document_name = 'David CV'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ where _ not in ( select _ from _ ) | select document_name from documents where document_code not in ( select document_code from document_sections )
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ where _ not in ( select _ from _ ) | select document_name from documents where document_code not in ( select document_code from document_sections )
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ order by count ( _ ) desc limit _ | select user_name , password from users group by role_code order by count ( * ) desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 _ from _ group by _ order by count ( _ ) desc limit _ | select user_name , password from users group by role_code order by count ( * ) desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 ( _ ) from _ where _ | 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'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 ( _ ) from _ where _ | 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'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find names of the document without any images. | 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 _ from _ except select _ from _ | select document_name from documents except select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code join document_sections_images on document_sections.section_id = document_sections_images.section_id
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of documents that do not have any images? | 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 _ from _ except select _ from _ | select document_name from documents except select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code join document_sections_images on document_sections.section_id = document_sections_images.section_id
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the document with the most number of 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 _ from _ group by _ order by count ( _ ) desc limit _ | select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code group by documents.document_code order by count ( * ) desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the name of the document that has the most 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 _ from _ group by _ order by count ( _ ) desc limit _ | select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code group by documents.document_code order by count ( * ) desc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all the document names which contains "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 _ from _ where _ like _ | select document_name from documents where document_name like '%CV%'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of documents that contain the substring "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 _ from _ where _ like _ | select document_name from documents where document_name like '%CV%'
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many users are logged in? | 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 count ( _ ) from _ where _ | select count ( * ) from users where user_login = 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of users that are logged in. | 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 count ( _ ) from _ where _ | select count ( * ) from users where user_login = 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the description of the most popular role among the users that have logged in. | 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 _ from _ where _ = ( select _ from _ where _ group by _ order by count ( _ ) desc limit _ ) | select role_description from roles where role_code = ( select role_code from users where user_login = 1 group by role_code order by count ( * ) desc limit 1 )
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the description of the most popular role among users that have logged in? | 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 _ from _ where _ = ( select _ from _ where _ group by _ order by count ( _ ) desc limit _ ) | select role_description from roles where role_code = ( select role_code from users where user_login = 1 group by role_code order by count ( * ) desc limit 1 )
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the average access count of documents with the least 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 avg ( _ ) from _ group by _ order by count ( _ ) asc limit _ | select avg ( access_count ) from documents group by document_structure_code order by count ( * ) asc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average access count of documents that have the least common 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 avg ( _ ) from _ group by _ order by count ( _ ) asc limit _ | select avg ( access_count ) from documents group by document_structure_code order by count ( * ) asc limit 1
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List all the image name and URLs in the order of their names. | 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 _ from _ order by _ asc | select image_name , image_url from images order by image_name asc
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names and urls of images, sorted alphabetically? | 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 _ from _ order by _ asc | select image_name , image_url from images order by image_name asc
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of users in each 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 count ( _ ) , _ from _ group by _ | select count ( * ) , role_code from users group by role_code
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different role codes for users, and how many users have each? | 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 count ( _ ) , _ from _ group by _ | select count ( * ) , role_code from users group by role_code
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What document types have more than 2 corresponding documents? | 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 _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 2
document_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the codes of document types that have more than 2 corresponding documents. | 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 _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 2
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many companies are there? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select count ( _ ) from _ | select count ( * ) from companies
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select count ( _ ) from _ | select count ( * ) from companies
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of companies in descending order of market value. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ desc | select name from companies order by market_value_billion desc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Sort the company names in descending order of the company's market value. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ desc | select name from companies order by market_value_billion desc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of companies whose headquarters are not "USA"? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ | select name from companies where headquarters != 'USA'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of the companies whose headquarters are not located in "USA". | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ | select name from companies where headquarters != 'USA'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the name and assets of each company, sorted in ascending order of company name? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ asc | select name , assets_billion from companies order by name asc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name and assets of each company in ascending order of company name. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ asc | select name , assets_billion from companies order by name asc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the average profits of companies? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select avg ( _ ) from _ | select avg ( profits_billion ) from companies
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Compute the average profits companies make. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select avg ( _ ) from _ | select avg ( profits_billion ) from companies
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the maximum and minimum sales of the companies whose industries are not "Banking". | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select max ( _ ) , min ( _ ) from _ where _ | select max ( sales_billion ) , min ( sales_billion ) from companies where industry != 'Banking'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the maximum and minimum sales of the companies that are not in the "Banking" industry. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select max ( _ ) , min ( _ ) from _ where _ | select max ( sales_billion ) , min ( sales_billion ) from companies where industry != 'Banking'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different industries are the companies in? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select count ( distinct _ ) from _ | select count ( distinct industry ) from companies
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of distinct company industries. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select count ( distinct _ ) from _ | select count ( distinct industry ) from companies
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of buildings in descending order of building height. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ desc | select name from buildings order by height desc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of buildings sorted in descending order of building height? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ desc | select name from buildings order by height desc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the stories of the building with the largest height. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ desc limit _ | select stories from buildings order by height desc limit 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the stories of highest building? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ order by _ desc limit _ | select stories from buildings order by height desc limit 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name of a building along with the name of a company whose office is in the building. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ | select companies.name , buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each company, return the company name and the name of the building its office is located in. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ | select companies.name , buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of the buildings that have more than one company offices. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ having count ( _ ) > _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id having count ( * ) > 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which buildings have more than one company offices? Give me the building names. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ having count ( _ ) > _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id having count ( * ) > 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name of the building that has the most company offices. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id order by count ( * ) desc limit 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which building has the largest number of company offices? Give me the building name. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id order by count ( * ) desc limit 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the names of the buildings whose status is "on-hold", in ascending order of stories. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ order by _ asc | select name from buildings where status = 'on-hold' order by stories asc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of the buildings in "on-hold" status, and sort them in ascending order of building stories. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ order by _ asc | select name from buildings where status = 'on-hold' order by stories asc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show each industry and the corresponding number of companies in that industry. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ , count ( _ ) from _ group by _ | select industry , count ( * ) from companies group by industry
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Whah are the name of each industry and the number of companies in that industry? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ , count ( _ ) from _ group by _ | select industry , count ( * ) from companies group by industry
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the industries of companies in descending order of the number of companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ order by count ( _ ) desc | select industry from companies group by industry order by count ( * ) desc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Sort all the industries in descending order of the count of companies in each industry | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ order by count ( _ ) desc | select industry from companies group by industry order by count ( * ) desc
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the industry shared by the most companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select industry from companies group by industry order by count ( * ) desc limit 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which industry has the most companies? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select industry from companies group by industry order by count ( * ) desc limit 1
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of buildings that have no company office. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ not in ( select _ from _ ) | select name from buildings where id not in ( select building_id from office_locations )
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which buildings do not have any company office? Give me the building names. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ not in ( select _ from _ ) | select name from buildings where id not in ( select building_id from office_locations )
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the industries shared by companies whose headquarters are "USA" and companies whose headquarters are "China". | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ intersect select _ from _ where _ | select industry from companies where headquarters = 'USA' intersect select industry from companies where headquarters = 'China'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which industries have both companies with headquarter in "USA" and companies with headquarter in "China"? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ where _ intersect select _ from _ where _ | select industry from companies where headquarters = 'USA' intersect select industry from companies where headquarters = 'China'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of companies whose industry is "Banking" or "Conglomerate", | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select count ( _ ) from _ where _ | select count ( * ) from companies where industry = 'Banking' or industry = 'Conglomerate'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many companies are in either "Banking" industry or "Conglomerate" industry? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select count ( _ ) from _ where _ | select count ( * ) from companies where industry = 'Banking' or industry = 'Conglomerate'
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the headquarters shared by more than two companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ having count ( _ ) > _ | select headquarters from companies group by headquarters having count ( * ) > 2
company_office
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which headquarter locations are used by more than 2 companies? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | ### Response: select _ from _ group by _ having count ( _ ) > _ | select headquarters from companies group by headquarters having count ( * ) > 2
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many products are there? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select count ( _ ) from _ | select count ( * ) from products
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name of products in ascending order of price. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ order by _ asc | select product_name from products order by product_price asc
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names and type codes of products? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ | select product_name , product_type_code from products
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the prices of the products named "Dining" or "Trading Policy". | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ where _ | select product_price from products where product_name = 'Dining' or product_name = 'Trading Policy'
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average price for products? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select avg ( _ ) from _ | select avg ( product_price ) from products
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the product with the highest price? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ order by _ desc limit _ | select product_name from products order by product_price desc limit 1
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show different type codes of products and the number of products with each type code. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ , count ( _ ) from _ group by _ | select product_type_code , count ( * ) from products group by product_type_code
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the most common type code across products. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ group by _ order by count ( _ ) desc limit _ | select product_type_code from products group by product_type_code order by count ( * ) desc limit 1
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the product type codes that have at least two products. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ group by _ having count ( _ ) >= _ | select product_type_code from products group by product_type_code having count ( * ) >= 2
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ where _ intersect select _ from _ where _ | select product_type_code from products where product_price > 4500 intersect select product_type_code from products where product_price < 3000
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of products and the number of events they are in. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of products and the number of events they are in, sorted by the number of events in descending order. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select products.product_name , count ( * ) from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name order by count ( * ) desc
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of products that are in at least two events. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ group by _ having count ( _ ) >= _ | select products.product_name from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name having count ( * ) >= 2
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of products that are in at least two events in ascending alphabetical order of product name. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ group by _ having count ( _ ) >= _ order by _ asc | select products.product_name from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name having count ( * ) >= 2 order by products.product_name asc
solvency_ii
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of products that are not in any event. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | ### Response: select _ from _ where _ not in ( select _ from _ ) | select product_name from products where product_id not in ( select product_id from products_in_events )
entertainment_awards
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many artworks are there? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | ### Response: select count ( _ ) from _ | select count ( * ) from artwork
entertainment_awards
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name of artworks in ascending alphabetical order. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | ### Response: select _ from _ order by _ asc | select name from artwork order by name asc