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

Convert text to sql: Which document has the most draft copies? List its document id and number of draft copies. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select document_id , count ( copy_number ) from draft_copies group by document_id order by count ( copy_number ) desc limit 1
### Instruction:

Convert text to sql: Which documents have more than 1 draft copies? List document id and number of draft copies. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select document_id , count ( * ) from draft_copies group by document_id having count ( * ) > 1
### Instruction:

Convert text to sql: List all employees in the circulation history of the document with id 1. List the employee's name. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ from _ where _ | select employees.employee_name from employees join circulation_history on circulation_history.employee_id = employees.employee_id where circulation_history.document_id = 1
### Instruction:

Convert text to sql: List the employees who have not showed up in any circulation history of documents. List the employee's name. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ from _ except select _ from _ | select employee_name from employees except select employees.employee_name from employees join circulation_history on circulation_history.employee_id = employees.employee_id
### Instruction:

Convert text to sql: Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select employees.employee_name , count ( * ) from employees join circulation_history on circulation_history.employee_id = employees.employee_id group by circulation_history.document_id , circulation_history.draft_number , circulation_history.copy_number order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | 

### Response:

select _ , count ( distinct _ ) from _ group by _ | select document_id , count ( distinct employee_id ) from circulation_history group by document_id
### Instruction:

Convert text to sql: List all department names ordered by their starting date. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | 

### Response:

select _ from _ order by _ asc | select dname from department order by mgr_start_date asc
### Instruction:

Convert text to sql: find all dependent names who have a spouse relation with some employee. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | 

### Response:

select _ from _ where _ | select dependent_name from dependent where relationship = 'Spouse'
### Instruction:

Convert text to sql: how many female dependents are there? | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from dependent where sex = 'F'
### Instruction:

Convert text to sql: Find the names of departments that are located in Houston. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | 

### Response:

select _ from _ where _ | select department.dname from department join dept_locations on department.dnumber = dept_locations.dnumber where dept_locations.dlocation = 'Houston'
### Instruction:

Convert text to sql: Return the first names and last names of employees who earn more than 30000 in salary. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | 

### Response:

select _ from _ where _ | select fname , lname from employee where salary > 30000
### Instruction:

Convert text to sql: Find the number of employees of each gender whose salary is lower than 50000. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , sex from employee where salary < 50000 group by sex
### Instruction:

Convert text to sql: list the first and last names, and the addresses of all employees in the ascending order of their birth date. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | 

### Response:

select _ from _ order by _ asc | select fname , lname , address from employee order by bdate asc
### Instruction:

Convert text to sql: what are the event details of the services that have the type code 'Marriage'? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ where _ | select events.event_details from events join services on events.service_id = services.service_id where services.service_type_code = 'Marriage'
### Instruction:

Convert text to sql: What are the ids and details of events that have more than one participants? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select events.event_id , events.event_details from events join participants_in_events on events.event_id = participants_in_events.event_id group by events.event_id having count ( * ) > 1
### Instruction:

Convert text to sql: How many events have each participants attended? List the participant id, type and the number. | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select participants.participant_id , participants.participant_type_code , count ( * ) from participants join participants_in_events on participants.participant_id = participants_in_events.participant_id group by participants.participant_id
### Instruction:

Convert text to sql: What are all the the participant ids, type code and details? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ | select participant_id , participant_type_code , participant_details from participants
### Instruction:

Convert text to sql: How many participants belong to the type 'Organizer'? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from participants where participant_type_code = 'Organizer'
### Instruction:

Convert text to sql: List the type of the services in alphabetical order. | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ order by _ asc | select service_type_code from services order by service_type_code asc
### Instruction:

Convert text to sql: List the service id and details for the events. | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ | select service_id , event_details from events
### Instruction:

Convert text to sql: How many events had participants whose details had the substring 'Dr.' | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select count ( _ ) from _ where _ like _ | select count ( * ) from participants join participants_in_events on participants.participant_id = participants_in_events.participant_id where participants.participant_details like '%Dr.%'
### Instruction:

Convert text to sql: What is the most common participant type? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select participant_type_code from participants group by participant_type_code order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which service id and type has the least number of participants? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ group by _ order by count ( _ ) asc limit _ | select events.service_id , services.service_type_code from participants join participants_in_events on participants.participant_id = participants_in_events.participant_id join events on participants_in_events.event_id = events.event_id join services on events.service_id = services.service_id group by events.service_id order by count ( * ) asc limit 1
### Instruction:

Convert text to sql: What is the id of the event with the most participants? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select event_id from participants_in_events group by event_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which events id does not have any participant with detail 'Kenyatta Kuhn'? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | 

### Response:

select _ from _ except select _ from _ where _ | select event_id from events except select participants_in_events.event_id from participants_in_events join participants on participants_in_events.participant_id = participants.participant_id where participant_details = 'Kenyatta Kuhn'