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

Convert text to sql: How many persons are not body builders? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from people where people_id not in ( select people_id from body_builder )
### Instruction:

Convert text to sql: List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select _ from _ where _ | select people.weight from body_builder join people on body_builder.people_id = people.people_id where body_builder.snatch > 140 or people.height > 200
### Instruction:

Convert text to sql: What are the total scores of the body builders whose birthday contains the string "January" ? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select _ from _ where _ like _ | select body_builder.total from body_builder join people on body_builder.people_id = people.people_id where people.birth_date like '%January%'
### Instruction:

Convert text to sql: What is the minimum snatch score? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | 

### Response:

select min ( _ ) from _ | select min ( snatch ) from body_builder
### Instruction:

Convert text to sql: How many elections are there? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

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

Convert text to sql: List the votes of elections in descending order. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ order by _ desc | select votes from election order by votes desc
### Instruction:

Convert text to sql: List the dates and vote percents of elections. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ | select date , vote_percent from election
### Instruction:

Convert text to sql: What are the minimum and maximum vote percents of elections? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select min ( _ ) , max ( _ ) from _ | select min ( vote_percent ) , max ( vote_percent ) from election
### Instruction:

Convert text to sql: What are the names and parties of representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ | select name , party from representative
### Instruction:

Convert text to sql: What are the names of representatives whose party is not "Republican"? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ where _ | select name from representative where party != 'Republican'
### Instruction:

Convert text to sql: What are the life spans of representatives from New York state or Indiana state? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ where _ | select lifespan from representative where state = 'New York' or state = 'Indiana'
### Instruction:

Convert text to sql: What are the names of representatives and the dates of elections they participated in. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ | select representative.name , election.date from election join representative on election.representative_id = representative.representative_id
### Instruction:

Convert text to sql: What are the names of representatives with more than 10000 votes in election? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ where _ | select representative.name from election join representative on election.representative_id = representative.representative_id where votes > 10000
### Instruction:

Convert text to sql: What are the names of representatives in descending order of votes? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ order by _ desc | select representative.name from election join representative on election.representative_id = representative.representative_id order by votes desc
### Instruction:

Convert text to sql: What is the party of the representative that has the smallest number of votes. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ order by _ asc limit _ | select representative.party from election join representative on election.representative_id = representative.representative_id order by votes asc limit 1
### Instruction:

Convert text to sql: What are the lifespans of representatives in descending order of vote percent? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ order by _ desc | select representative.lifespan from election join representative on election.representative_id = representative.representative_id order by vote_percent desc
### Instruction:

Convert text to sql: What is the average number of votes of representatives from party "Republican"? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select avg ( _ ) from _ where _ | select avg ( election.votes ) from election join representative on election.representative_id = representative.representative_id where representative.party = 'Republican'
### Instruction:

Convert text to sql: What are the different parties of representative? Show the party name and the number of representatives in each party. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

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

Convert text to sql: What is the party that has the largest number of representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

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

Convert text to sql: What parties have at least three representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select party from representative group by party having count ( * ) >= 3
### Instruction:

Convert text to sql: What states have at least two representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select state from representative group by state having count ( * ) >= 2
### Instruction:

Convert text to sql: List the names of representatives that have not participated in elections listed here. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from representative where representative_id not in ( select representative_id from election )
### Instruction:

Convert text to sql: Show the parties that have both representatives in New York state and representatives in Pennsylvania state. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select party from representative where state = 'New York' intersect select party from representative where state = 'Pennsylvania'
### Instruction:

Convert text to sql: How many distinct parties are there for representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | 

### Response:

select count ( distinct _ ) from _ | select count ( distinct party ) from representative
### Instruction:

Convert text to sql: How many apartment bookings are there in total? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

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

Convert text to sql: Count the total number of apartment bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

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

Convert text to sql: Show the start dates and end dates of all the apartment bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select _ from _ | select booking_start_date , booking_end_date from apartment_bookings
### Instruction:

Convert text to sql: What are the start date and end date of each apartment booking? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select _ from _ | select booking_start_date , booking_end_date from apartment_bookings
### Instruction:

Convert text to sql: Show all distinct building descriptions. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select distinct _ from _ | select distinct building_description from apartment_buildings
### Instruction:

Convert text to sql: Give me a list of all the distinct building descriptions. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select distinct _ from _ | select distinct building_description from apartment_buildings
### Instruction:

Convert text to sql: Show the short names of the buildings managed by "Emma". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select _ from _ where _ | select building_short_name from apartment_buildings where building_manager = 'Emma'
### Instruction:

Convert text to sql: Which buildings does "Emma" manage? Give me the short names of the buildings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select _ from _ where _ | select building_short_name from apartment_buildings where building_manager = 'Emma'
### Instruction:

Convert text to sql: Show the addresses and phones of all the buildings managed by "Brenden". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select _ from _ where _ | select building_address , building_phone from apartment_buildings where building_manager = 'Brenden'
### Instruction:

Convert text to sql: What are the address and phone number of the buildings managed by "Brenden"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select _ from _ where _ | select building_address , building_phone from apartment_buildings where building_manager = 'Brenden'
### Instruction:

Convert text to sql: What are the building full names that contain the word "court"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | 

### Response:

select _ from _ where _ like _ | select building_full_name from apartment_buildings where building_full_name like '%court%'