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

Convert text to sql: Find the starting date and ending data in location for the document named "Robin CV". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select document_locations.date_in_location_from , document_locations.date_in_locaton_to from document_locations join all_documents on document_locations.document_id = all_documents.document_id where all_documents.document_name = 'Robin CV'
### Instruction:

Convert text to sql: Show the location codes and the number of documents in each location. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select location_code , count ( * ) from document_locations group by location_code
### Instruction:

Convert text to sql: What is the code of each location and the number of documents in that location? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select location_code , count ( * ) from document_locations group by location_code
### Instruction:

Convert text to sql: What is the location code with the most documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select location_code from document_locations group by location_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Find the code of the location with the largest number of documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select location_code from document_locations group by location_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Show the location codes with at least 3 documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select location_code from document_locations group by location_code having count ( * ) >= 3
### Instruction:

Convert text to sql: What are the codes of the locations with at least three documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select location_code from document_locations group by location_code having count ( * ) >= 3
### Instruction:

Convert text to sql: Show the location name and code with the least documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select ref_locations.location_name , document_locations.location_code from document_locations join ref_locations on document_locations.location_code = ref_locations.location_code group by document_locations.location_code order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What are the name and code of the location with the smallest number of documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select ref_locations.location_name , document_locations.location_code from document_locations join ref_locations on document_locations.location_code = ref_locations.location_code group by document_locations.location_code order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select employees.employee_name , employees.employee_name from documents_to_be_destroyed join employees on documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id join employees on documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id
### Instruction:

Convert text to sql: List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select employees.employee_name , employees.employee_name from documents_to_be_destroyed join employees on documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id join employees on documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id
### Instruction:

Convert text to sql: Show the id of each employee and the number of document destruction authorised by that employee. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | 

### Response:

select destruction_authorised_by_employee_id , count ( * ) from documents_to_be_destroyed group by destruction_authorised_by_employee_id