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

Convert text to sql: What are the names of all instructors with a higher salary than any of the instructors in the Biology department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | 

### Response:

select _ from _ where _ > ( select max ( _ ) from _ where _ ) | select name from instructor where salary > ( select max ( salary ) from instructor where dept_name = 'Biology' )
### Instruction:

Convert text to sql: How many debates are there? | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from debate
### Instruction:

Convert text to sql: List the venues of debates in ascending order of the number of audience. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ order by _ asc | select venue from debate order by num_of_audience asc
### Instruction:

Convert text to sql: What are the date and venue of each debate? | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ | select date , venue from debate
### Instruction:

Convert text to sql: List the dates of debates with number of audience bigger than 150 | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ where _ | select date from debate where num_of_audience > 150
### Instruction:

Convert text to sql: Show the names of people aged either 35 or 36. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ where _ | select name from people where age = 35 or age = 36
### Instruction:

Convert text to sql: What is the party of the youngest people? | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ order by _ asc limit _ | select party from people order by age asc limit 1
### Instruction:

Convert text to sql: Show different parties of people along with the number of people in each party. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select party , count ( * ) from people group by party
### Instruction:

Convert text to sql: Show the party that has the most people. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

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

Convert text to sql: Show the distinct venues of debates | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select distinct _ from _ | select distinct venue from debate
### Instruction:

Convert text to sql: Show the names of people, and dates and venues of debates they are on the affirmative side. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ | select people.name , debate.date , debate.venue from debate_people join debate on debate_people.debate_id = debate.debate_id join people on debate_people.affirmative = people.people_id
### Instruction:

Convert text to sql: Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ order by _ asc | select people.name , debate.date , debate.venue from debate_people join debate on debate_people.debate_id = debate.debate_id join people on debate_people.negative = people.people_id order by people.name asc
### Instruction:

Convert text to sql: Show the names of people that are on affirmative side of debates with number of audience bigger than 200. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ where _ | select people.name from debate_people join debate on debate_people.debate_id = debate.debate_id join people on debate_people.affirmative = people.people_id where debate.num_of_audience > 200
### Instruction:

Convert text to sql: Show the names of people and the number of times they have been on the affirmative side of debates. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select people.name , count ( * ) from debate_people join people on debate_people.affirmative = people.people_id group by people.name
### Instruction:

Convert text to sql: Show the names of people who have been on the negative side of debates at least twice. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select people.name from debate_people join people on debate_people.negative = people.people_id group by people.name having count ( * ) >= 2
### Instruction:

Convert text to sql: List the names of people that have not been on the affirmative side of debates. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select affirmative from debate_people )
### Instruction:

Convert text to sql: List the names of all the customers in alphabetical order. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ order by _ asc | select customer_details from customers order by customer_details asc
### Instruction:

Convert text to sql: Sort the customer names in alphabetical order. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ order by _ asc | select customer_details from customers order by customer_details asc
### Instruction:

Convert text to sql: Find all the policy type codes associated with the customer "Dayana Robel" | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ | select policy_type_code from policies join customers on policies.customer_id = customers.customer_id where customers.customer_details = 'Dayana Robel'
### Instruction:

Convert text to sql: What are the type codes of the policies used by the customer "Dayana Robel"? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ where _ | select policy_type_code from policies join customers on policies.customer_id = customers.customer_id where customers.customer_details = 'Dayana Robel'
### Instruction:

Convert text to sql: Which type of policy is most frequently used? Give me the policy type code. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

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

Convert text to sql: Find the type code of the most frequently used policy. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

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

Convert text to sql: Find all the policy types that are used by more than 2 customers. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select policy_type_code from policies group by policy_type_code having count ( * ) > 2
### Instruction:

Convert text to sql: Which types of policy are chosen by more than 2 customers? Give me the policy type codes. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select policy_type_code from policies group by policy_type_code having count ( * ) > 2
### Instruction:

Convert text to sql: Find the total and average amount paid in claim headers. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select sum ( _ ) , avg ( _ ) from _ | select sum ( amount_piad ) , avg ( amount_piad ) from claim_headers
### Instruction:

Convert text to sql: What are the total amount and average amount paid in claim headers? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select sum ( _ ) , avg ( _ ) from _ | select sum ( amount_piad ) , avg ( amount_piad ) from claim_headers
### Instruction:

Convert text to sql: Find the total amount claimed in the most recently created document. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | 

### Response:

select sum ( _ ) from _ where _ = ( select _ from _ order by _ asc limit _ ) | select sum ( claim_headers.amount_claimed ) from claim_headers join claims_documents on claim_headers.claim_header_id = claims_documents.claim_id where claims_documents.created_date = ( select created_date from claims_documents order by created_date asc limit 1 )