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

Convert text to sql: What are the resident details containing the substring 'Miss'? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | 

### Response:

select other_details from residents where other_details like '%Miss%'
### Instruction:

Convert text to sql: List the customer event id and the corresponding move in date and property id. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | 

### Response:

select customer_event_id , date_moved_in , property_id from customer_events
### Instruction:

Convert text to sql: How many customers did not have any event? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | 

### Response:

select count ( * ) from customers where customer_id not in ( select customer_id from customer_events )
### Instruction:

Convert text to sql: What are the distinct move in dates of the residents? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | 

### Response:

select distinct date_moved_in from residents
### Instruction:

Convert text to sql: How many schools are there? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select count ( * ) from school

### Instruction:

Convert text to sql: Count the number of schools. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select count ( * ) from school

### Instruction:

Convert text to sql: List the locations of schools in ascending order of enrollment. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select location from school order by enrollment asc

### Instruction:

Convert text to sql: What is the list of school locations sorted in ascending order of school enrollment? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select location from school order by enrollment asc
### Instruction:

Convert text to sql: List the locations of schools in descending order of founded year. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select location from school order by founded desc

### Instruction:

Convert text to sql: What is the list of school locations sorted in descending order of school foundation year? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select location from school order by founded desc

### Instruction:

Convert text to sql: What are the enrollments of schools whose denomination is not "Catholic"? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select enrollment from school where denomination != 'Catholic'

### Instruction:

Convert text to sql: List the enrollment for each school that does not have "Catholic" as denomination. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select enrollment from school where denomination != 'Catholic'
### Instruction:

Convert text to sql: What is the average enrollment of schools? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select avg ( enrollment ) from school

### Instruction:

Convert text to sql: Take the average of the school enrollment. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select avg ( enrollment ) from school

### Instruction:

Convert text to sql: What are the teams of the players, sorted in ascending alphabetical order? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select team from player order by team asc

### Instruction:

Convert text to sql: Find the team of each player and sort them in ascending alphabetical order. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select team from player order by team asc
### Instruction:

Convert text to sql: How many different positions of players are there? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select count ( distinct position ) from player

### Instruction:

Convert text to sql: Count the number of distinct player positions. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select count ( distinct position ) from player

### Instruction:

Convert text to sql: Find the team of the player of the highest age. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select team from player order by age desc limit 1

### Instruction:

Convert text to sql: Which team has the oldest player? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select team from player order by age desc limit 1
### Instruction:

Convert text to sql: List the teams of the players with the top 5 largest ages. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select team from player order by age desc limit 5

### Instruction:

Convert text to sql: What are the teams that have the 5 oldest players? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select team from player order by age desc limit 5

### Instruction:

Convert text to sql: For each player, show the team and the location of school they belong to. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select player.team , school.location from player join school on player.school_id = school.school_id

### Instruction:

Convert text to sql: What are the team and the location of school each player belongs to? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | 

### Response:

select player.team , school.location from player join school on player.school_id = school.school_id