db_id
stringlengths
4
31
text
stringlengths
370
4.84k
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name of colleges that have at least two players. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select college from match_season group by college having count ( * ) >= 2
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of all colleges that have two or more players? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select college from match_season group by college having count ( * ) >= 2
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name of colleges that have at least two players in descending alphabetical order. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select college from match_season group by college having count ( * ) >= 2 order by college desc
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of colleges that have two or more players, listed in descending alphabetical order? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select college from match_season group by college having count ( * ) >= 2 order by college desc
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of teams that do no have match season record? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select name from team where team_id not in ( select team from match_season )
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the names of teams that have no match season record. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select name from team where team_id not in ( select team from match_season )
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of countries that have both players with position forward and players with position defender? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Forward' intersect select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the names of countries that have players that play the Forward position, as well as players who play the Defender position. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Forward' intersect select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which college have both players with position midfielder and players with position defender? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select college from match_season where position = 'Midfielder' intersect select college from match_season where position = 'Defender'
match_season
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | ### Response: select college from match_season where position = 'Midfielder' intersect select college from match_season where position = 'Defender'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many climbers are there? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select count ( * ) from climber
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of climbers. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select count ( * ) from climber
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of climbers in descending order of points. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from climber order by points desc
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the climbers, ordered by points descending? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from climber order by points desc
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of climbers whose country is not Switzerland. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from climber where country != 'Switzerland'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of climbers who are not from the country of Switzerland? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from climber where country != 'Switzerland'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the maximum point for climbers whose country is United Kingdom? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select max ( points ) from climber where country = 'United Kingdom'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the maximum number of points for climbers from the United Kingdom. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select max ( points ) from climber where country = 'United Kingdom'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct countries are the climbers from? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select count ( distinct country ) from climber
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of different countries that climbers are from. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select count ( distinct country ) from climber
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of mountains in ascending alphabetical order? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain order by name asc
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the names of mountains in alphabetical order. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain order by name asc
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the countries of mountains with height bigger than 5000? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country from mountain where height > 5000
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the countries of the mountains that have a height larger than 5000. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country from mountain where height > 5000
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the highest mountain? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain order by height desc limit 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the name of the mountain with the greatest height. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain order by height desc limit 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the distinct ranges of the mountains with the top 3 prominence. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select distinct range from mountain order by prominence desc limit 3
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different ranges of the 3 mountains with the highest prominence? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select distinct range from mountain order by prominence desc limit 3
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names of climbers and the names of mountains they climb. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select climber.name , mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of climbers and the corresponding names of mountains that they climb? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select climber.name , mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of climbers and the heights of mountains they climb. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select climber.name , mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of climbers and the corresponding heights of the mountains that they climb? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select climber.name , mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the height of the mountain climbed by the climber with the maximum points. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id order by climber.points desc limit 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the height of the mountain climbined by the climbing who had the most points? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id order by climber.points desc limit 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the distinct names of mountains climbed by climbers from country "West Germany". | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select distinct mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id where climber.country = 'West Germany'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different names of mountains ascended by climbers from the country of West Germany? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select distinct mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id where climber.country = 'West Germany'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the times used by climbers to climb mountains in Country Uganda. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select climber.time from climber join mountain on climber.mountain_id = mountain.mountain_id where mountain.country = 'Uganda'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the times used by climbers who climbed mountains in the country of Uganda? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select climber.time from climber join mountain on climber.mountain_id = mountain.mountain_id where mountain.country = 'Uganda'
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the countries and the number of climbers from each country. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country , count ( * ) from climber group by country
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many climbers are from each country? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country , count ( * ) from climber group by country
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the countries that have more than one mountain. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country from mountain group by country having count ( * ) > 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which countries have more than one mountain? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country from mountain group by country having count ( * ) > 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of mountains that do not have any climber. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain where mountain_id not in ( select mountain_id from climber )
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of countains that no climber has climbed? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain where mountain_id not in ( select mountain_id from climber )
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country from mountain where height > 5600 intersect select country from mountain where height < 5200
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the countries that have both mountains that are higher than 5600 and lower than 5200? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select country from mountain where height > 5600 intersect select country from mountain where height < 5200
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the range that has the most number of mountains. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select range from mountain group by range order by count ( * ) desc limit 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which range contains the most mountains? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select range from mountain group by range order by count ( * ) desc limit 1
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the names of mountains with height more than 5000 or prominence more than 1000. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain where height > 5000 or prominence > 1000
climbing
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of mountains that have a height of over 5000 or a prominence of over 1000? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | ### Response: select name from mountain where height > 5000 or prominence > 1000
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many body builders are there? | 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 body_builder
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the total scores of body builders in ascending order. | 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 total from body_builder order by total asc
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the snatch score and clean jerk score of body builders in ascending order of 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 snatch , clean_jerk from body_builder order by snatch asc
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average snatch score of 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 avg ( snatch ) from body_builder
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the clean and jerk score of the body builder with the highest total 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 clean_jerk from body_builder order by total desc limit 1
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the birthdays of people in ascending order of height? | 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 birth_date from people order by height asc
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of 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 people.name from body_builder join people on body_builder.people_id = people.people_id
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of body builders whose total score is higher than 300? | 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 people.name from body_builder join people on body_builder.people_id = people.people_id where body_builder.total > 300
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the body builder with the greatest body weight? | 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 people.name from body_builder join people on body_builder.people_id = people.people_id order by people.weight desc limit 1
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the birth date and birth place of the body builder with the highest total points? | 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 people.birth_date , people.birth_place from body_builder join people on body_builder.people_id = people.people_id order by body_builder.total desc limit 1
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the heights of body builders with total score smaller than 315? | 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 people.height from body_builder join people on body_builder.people_id = people.people_id where body_builder.total < 315
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average total score of body builders with height bigger 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 avg ( body_builder.total ) from body_builder join people on body_builder.people_id = people.people_id where people.height > 200
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of body builders in descending order of total scores? | 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 people.name from body_builder join people on body_builder.people_id = people.people_id order by body_builder.total desc
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List each birth place along with the number of people from there. | 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 birth_place , count ( * ) from people group by birth_place
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the most common birth place of people? | 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 birth_place from people group by birth_place order by count ( * ) desc limit 1
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the birth places that are shared by at least two people? | 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 birth_place from people group by birth_place having count ( * ) >= 2
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the height and weight of people in descending order of height. | 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 height , weight from people order by height desc
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show all information about each body builder. | 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 body_builder
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names and origins of people who 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 name , birth_place from people except select people.name , people.birth_place from people join body_builder on people.people_id = body_builder.people_id
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct birth places are there? | 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 ( distinct birth_place ) from people
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 people where people_id not in ( select people_id from body_builder )
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 people.weight from body_builder join people on body_builder.people_id = people.people_id where body_builder.snatch > 140 or people.height > 200
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 body_builder.total from body_builder join people on body_builder.people_id = people.people_id where people.birth_date like '%January%'
body_builder
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 ( snatch ) from body_builder
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 election
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 votes from election order by votes desc
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 date , vote_percent from election
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 ( vote_percent ) , max ( vote_percent ) from election
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 name , party from representative
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 name from representative where party != 'Republican'
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 lifespan from representative where state = 'New York' or state = 'Indiana'
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 representative.name , election.date from election join representative on election.representative_id = representative.representative_id
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 representative.name from election join representative on election.representative_id = representative.representative_id where votes > 10000
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 representative.name from election join representative on election.representative_id = representative.representative_id order by votes desc
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 representative.party from election join representative on election.representative_id = representative.representative_id order by votes asc limit 1
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 representative.lifespan from election join representative on election.representative_id = representative.representative_id order by vote_percent desc
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 ( election.votes ) from election join representative on election.representative_id = representative.representative_id where representative.party = 'Republican'
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 party , count ( * ) from representative group by party
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 party , count ( * ) from representative group by party order by count ( * ) desc limit 1
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 party from representative group by party having count ( * ) >= 3
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 state from representative group by state having count ( * ) >= 2
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 name from representative where representative_id not in ( select representative_id from election )
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 party from representative where state = 'New York' intersect select party from representative where state = 'Pennsylvania'
election_representative
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 party ) from representative
apartment_rentals
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 apartment_bookings
apartment_rentals
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 apartment_bookings
apartment_rentals
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 booking_start_date , booking_end_date from apartment_bookings
apartment_rentals
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 booking_start_date , booking_end_date from apartment_bookings
apartment_rentals
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 building_description from apartment_buildings
apartment_rentals
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### 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 building_description from apartment_buildings