db_id
stringclasses 20
values | prompt
stringlengths 424
2.17k
| ground_truth
stringlengths 27
254
|
---|---|---|
course_teach | 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 NatSQL: What is the name of each teacher and what course they teach? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name , course.Course from teacher |
course_teach | 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 NatSQL: Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name. | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name , course.Course from course_arrange order by teacher.Name asc |
course_teach | 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 NatSQL: What are the names of the teachers and the courses they teach in ascending alphabetical order by the name of the teacher? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name , course.Course from course_arrange order by teacher.Name asc |
course_teach | 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 NatSQL: Show the name of the teacher for the math course. | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name from course_arrange where course.Course = "Math" |
course_teach | 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 NatSQL: What are the names of the people who teach math courses? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name from course_arrange where course.Course = "Math" |
course_teach | 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 NatSQL: Show names of teachers and the number of courses they teach. | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name , count ( course_arrange.* ) from course_arrange group by teacher.Name |
course_teach | 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 NatSQL: What are the names of the teachers and how many courses do they teach? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name , count ( course_arrange.* ) from course_arrange group by teacher.Name |
course_teach | 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 NatSQL: Show names of teachers that teach at least two courses. | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name from course_arrange where count ( course_arrange.* ) >= 2 group by teacher.Name |
course_teach | 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 NatSQL: What are the names of the teachers who teach at least two courses? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name from course_arrange where count ( course_arrange.* ) >= 2 group by teacher.Name |
course_teach | 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 NatSQL: List the names of teachers who have not been arranged to teach courses. | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name from teacher where @.@ not in course_arrange.* |
course_teach | 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 NatSQL: What are the names of the teachers whose courses have not been arranged? | course : course_id , staring_date , course | teacher : teacher_id , name , age , hometown | course_arrange : course_id , teacher_id , grade | course_arrange.teacher_id = teacher.teacher_id | course_arrange.course_id = course.course_id |
### Response:
| select teacher.Name from teacher where @.@ not in course_arrange.* |
museum_visit | 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 NatSQL: How many visitors below age 30 are there? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select count ( visitor.* ) from visitor where visitor.Age < 30 |
museum_visit | 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 NatSQL: Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low. | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select visitor.Name from visitor where visitor.Level_of_membership > 4 order by visitor.Level_of_membership desc |
museum_visit | 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 NatSQL: What is the average age of the visitors whose membership level is not higher than 4? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select avg ( visitor.Age ) from visitor where visitor.Level_of_membership <= 4 |
museum_visit | 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 NatSQL: Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young. | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select visitor.Name , visitor.Level_of_membership from visitor where visitor.Level_of_membership > 4 order by visitor.Age desc |
museum_visit | 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 NatSQL: Find the id and name of the museum that has the most staff members? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select museum.Museum_ID , museum.Name from museum order by museum.Num_of_Staff desc limit 1 |
museum_visit | 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 NatSQL: Find the average number of staff working for the museums that were open before 2009. | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select avg ( museum.Num_of_Staff ) from museum where museum.Open_Year < 2009 |
museum_visit | 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 NatSQL: What are the opening year and staff number of the museum named Plaza Museum? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select museum.Num_of_Staff , museum.Open_Year from museum where museum.Name = "Plaza Museum" |
museum_visit | 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 NatSQL: find the names of museums which have more staff than the minimum staff number of all museums opened after 2010. | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select museum.Name from museum where @.@ > min ( museum.Num_of_Staff ) and museum.Open_Year > 2010 |
museum_visit | 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 NatSQL: find the id, name and age for visitors who visited some museums more than once. | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select visitor.ID , visitor.Name , visitor.Age from visit where count ( visit.* ) > 1 group by visitor.ID |
museum_visit | 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 NatSQL: What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select visit.visitor_id , visitor.Name , visitor.Level_of_membership from visitor group by visit.visitor_ID order by sum ( visit.Total_spent ) desc limit 1 |
museum_visit | 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 NatSQL: What are the id and name of the museum visited most times? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select museum.Museum_ID , museum.Name from visit group by visit.Museum_ID order by count ( visit.* ) desc limit 1 |
museum_visit | 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 NatSQL: What is the name of the museum that had no visitor yet? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select museum.Name from museum where @.@ not in visit.* |
museum_visit | 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 NatSQL: Find the name and age of the visitor who bought the most tickets at once. | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select visitor.Name , visitor.Age from visitor order by visit.Num_of_Ticket desc limit 1 |
museum_visit | 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 NatSQL: What are the average and maximum number of tickets bought in all visits? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select avg ( visit.Num_of_Ticket ) , max ( visit.Num_of_Ticket ) from visit |
museum_visit | 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 NatSQL: What is the total ticket expense of the visitors whose membership level is 1? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select sum ( visit.Total_spent ) from visitor where visitor.Level_of_membership = 1 |
museum_visit | 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 NatSQL: What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select visitor.Name from visitor where museum.Open_Year < 2009 and museum.Open_Year > 2011 |
museum_visit | 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 NatSQL: Find the number of visitors who did not visit any museum opened after 2010. | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select count ( visitor.* ) from visitor where @.@ not in visit.* and museum.Open_Year > 2010 |
museum_visit | 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 NatSQL: How many museums were opened after 2013 or before 2008? | museum : museum_id , name , num_of_staff , open_year | visitor : id , name , level_of_membership , age | visit : museum_id , visitor_id , num_of_ticket , total_spent | visit.visitor_id = visitor.id | visit.museum_id = museum.museum_id |
### Response:
| select count ( museum.* ) from museum where museum.Open_Year > 2013 or museum.Open_Year < 2008 |
wta_1 | 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 NatSQL: Find the total number of players. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( players.* ) from players |
wta_1 | 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 NatSQL: How many players are there? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( players.* ) from players |
wta_1 | 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 NatSQL: Find the total number of matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( matches.* ) from matches |
wta_1 | 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 NatSQL: Count the number of matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( matches.* ) from matches |
wta_1 | 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 NatSQL: List the first name and birth date of all players from the country with code USA. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.birth_date from players where players.country_code = "USA" |
wta_1 | 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 NatSQL: What are the first names and birth dates of players from the USA? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.birth_date from players where players.country_code = "USA" |
wta_1 | 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 NatSQL: Find the average age of losers and winners of all matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select avg ( matches.loser_age ) , avg ( matches.winner_age ) from matches |
wta_1 | 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 NatSQL: What are the average ages of losers and winners across matches? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select avg ( matches.loser_age ) , avg ( matches.winner_age ) from matches |
wta_1 | 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 NatSQL: Find the average rank of winners in all matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select avg ( matches.winner_rank ) from matches |
wta_1 | 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 NatSQL: What is the average rank for winners in all matches? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select avg ( matches.winner_rank ) from matches |
wta_1 | 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 NatSQL: Find the highest rank of losers in all matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select min ( matches.loser_rank ) from matches |
wta_1 | 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 NatSQL: What is the best rank of losers across all matches? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select min ( matches.loser_rank ) from matches |
wta_1 | 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 NatSQL: find the number of distinct country codes of all players. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( distinct players.country_code ) from players |
wta_1 | 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 NatSQL: How many distinct countries do players come from? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( distinct players.country_code ) from players |
wta_1 | 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 NatSQL: Find the number of distinct name of losers. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( distinct matches.loser_name ) from matches |
wta_1 | 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 NatSQL: How many different loser names are there? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( distinct matches.loser_name ) from matches |
wta_1 | 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 NatSQL: Find the name of tourney that has more than 10 matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.tourney_name from matches where count ( matches.* ) > 10 group by matches.tourney_name |
wta_1 | 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 NatSQL: What are the names of tournaments that have more than 10 matches? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.tourney_name from matches where count ( matches.* ) > 10 group by matches.tourney_name |
wta_1 | 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 NatSQL: List the names of all winners who played in both 2013 and 2016. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name from matches where matches.year = 2013 and matches.year = 2016 |
wta_1 | 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 NatSQL: What are the names of players who won in both 2013 and 2016? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name from matches where matches.year = 2013 and matches.year = 2016 |
wta_1 | 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 NatSQL: List the number of all matches who played in years of 2013 or 2016. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( matches.* ) from matches where matches.year = 2013 or matches.year = 2016 |
wta_1 | 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 NatSQL: How many matches were played in 2013 or 2016? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( matches.* ) from matches where matches.year = 2013 or matches.year = 2016 |
wta_1 | 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 NatSQL: What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code , players.first_name from players where matches.tourney_name = "WTA Championships" and matches.tourney_name = "Australian Open" |
wta_1 | 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 NatSQL: What are the first names and country codes for players who won both the WTA Championships and the Australian Open? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code , players.first_name from players where matches.tourney_name = "WTA Championships" and matches.tourney_name = "Australian Open" |
wta_1 | 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 NatSQL: Find the first name and country code of the oldest player. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.country_code from players order by players.birth_date asc limit 1 |
wta_1 | 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 NatSQL: What is the first name and country code of the oldest player? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.country_code from players order by players.birth_date asc limit 1 |
wta_1 | 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 NatSQL: List the first and last name of all players in the order of birth date. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.last_name from players order by players.birth_date asc |
wta_1 | 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 NatSQL: What are the full names of all players, sorted by birth date? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.last_name from players order by players.birth_date asc |
wta_1 | 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 NatSQL: List the first and last name of all players who are left / L hand in the order of birth date. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.last_name from players where players.hand = "L" order by players.birth_date asc |
wta_1 | 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 NatSQL: What are the full names of all left handed players, in order of birth date? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.last_name from players where players.hand = "L" order by players.birth_date asc |
wta_1 | 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 NatSQL: Find the first name and country code of the player who did the most number of tours. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code , players.first_name from players order by rankings.tours desc limit 1 |
wta_1 | 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 NatSQL: What is the first name and country code of the player with the most tours? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code , players.first_name from players order by rankings.tours desc limit 1 |
wta_1 | 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 NatSQL: Find the year that has the most number of matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.year from matches group by matches.year order by count ( matches.* ) desc limit 1 |
wta_1 | 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 NatSQL: Which year had the most matches? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.year from matches group by matches.year order by count ( matches.* ) desc limit 1 |
wta_1 | 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 NatSQL: Find the name and rank points of the winner who won the most times. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name , matches.winner_rank_points from matches group by matches.winner_name order by count ( matches.* ) desc limit 1 |
wta_1 | 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 NatSQL: What is the name of the winner who has won the most matches, and how many rank points does this player have? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name , matches.winner_rank_points from matches group by matches.winner_name order by count ( matches.* ) desc limit 1 |
wta_1 | 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 NatSQL: Find the name of the winner who has the highest rank points and participated in the Australian Open tourney. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name from matches where matches.tourney_name = "Australian Open" order by matches.winner_rank_points desc limit 1 |
wta_1 | 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 NatSQL: What is the name of the winner with the most rank points who participated in the Australian Open tournament? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name from matches where matches.tourney_name = "Australian Open" order by matches.winner_rank_points desc limit 1 |
wta_1 | 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 NatSQL: find the names of loser and winner who played in the match with greatest number of minutes. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name , matches.loser_name from matches order by matches.minutes desc limit 1 |
wta_1 | 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 NatSQL: What are the names of the winner and loser who played in the longest match? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select matches.winner_name , matches.loser_name from matches order by matches.minutes desc limit 1 |
wta_1 | 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 NatSQL: Find the average ranking for each player and their first name. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select avg ( rankings.ranking ) , players.first_name from players group by players.first_name |
wta_1 | 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 NatSQL: What are the first names of all players, and their average rankings? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select avg ( rankings.ranking ) , players.first_name from players group by players.first_name |
wta_1 | 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 NatSQL: Find the total ranking points for each player and their first name. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select sum ( rankings.ranking_points ) , players.first_name from players group by players.first_name |
wta_1 | 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 NatSQL: What are the first names of all players, and their total ranking points? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select sum ( rankings.ranking_points ) , players.first_name from players group by players.first_name |
wta_1 | 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 NatSQL: find the number of players for each country. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( players.* ) , players.country_code from players group by players.country_code |
wta_1 | 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 NatSQL: How many players are from each country? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( players.* ) , players.country_code from players group by players.country_code |
wta_1 | 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 NatSQL: find the code of the country where has the greatest number of players. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code from players group by players.country_code order by count ( players.* ) desc limit 1 |
wta_1 | 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 NatSQL: What is the code of the country with the most players? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code from players group by players.country_code order by count ( players.* ) desc limit 1 |
wta_1 | 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 NatSQL: Find the codes of countries that have more than 50 players. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code from players where count ( players.* ) > 50 group by players.country_code |
wta_1 | 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 NatSQL: What are the codes of countries with more than 50 players? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.country_code from players where count ( players.* ) > 50 group by players.country_code |
wta_1 | 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 NatSQL: Find the total number of tours for each ranking date. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select sum ( rankings.tours ) , rankings.ranking_date from rankings group by rankings.ranking_date |
wta_1 | 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 NatSQL: How many total tours were there for each ranking date? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select sum ( rankings.tours ) , rankings.ranking_date from rankings group by rankings.ranking_date |
wta_1 | 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 NatSQL: Find the number of matches happened in each year. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( matches.* ) , matches.year from matches group by matches.year |
wta_1 | 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 NatSQL: How many matches were played in each year? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( matches.* ) , matches.year from matches group by matches.year |
wta_1 | 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 NatSQL: Find the name and rank of the 3 youngest winners across all matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select distinct matches.winner_name , matches.winner_rank from matches order by matches.winner_age asc limit 3 |
wta_1 | 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 NatSQL: What are the names and ranks of the three youngest winners across all matches? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select distinct matches.winner_name , matches.winner_rank from matches order by matches.winner_age asc limit 3 |
wta_1 | 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 NatSQL: How many different winners both participated in the WTA Championships and were left handed? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( distinct matches.winner_name ) from matches where matches.tourney_name = "WTA Championships" and matches.winner_hand = "L" |
wta_1 | 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 NatSQL: Find the number of left handed winners who participated in the WTA Championships. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( distinct matches.winner_name ) from matches where matches.tourney_name = "WTA Championships" and matches.winner_hand = "L" |
wta_1 | 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 NatSQL: Find the first name, country code and birth date of the winner who has the highest rank points in all matches. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.country_code , players.birth_date from matches order by matches.winner_rank_points desc limit 1 |
wta_1 | 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 NatSQL: What is the first name, country code, and birth date of the player with the most winner rank points across all matches? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select players.first_name , players.country_code , players.birth_date from players order by matches.winner_rank_points desc limit 1 |
wta_1 | 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 NatSQL: Find the number of players for each hand type. | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( players.* ) , players.hand from players group by players.hand |
wta_1 | 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 NatSQL: How many players are there for each hand type? | players : player_id , first_name , last_name , hand , birth_date , country_code | matches : best_of , draw_size , loser_age , loser_entry , loser_hand , loser_ht , loser_id , loser_ioc , loser_name , loser_rank , loser_rank_points , loser_seed , match_num , minutes , round , score , surface , tourney_date , tourney_id , tourney_level , tourney_name , winner_age , winner_entry , winner_hand , winner_ht , winner_id , winner_ioc , winner_name , winner_rank , winner_rank_points , winner_seed , year | rankings : ranking_date , ranking , player_id , ranking_points , tours | matches.winner_id = players.player_id | matches.loser_id = players.player_id | rankings.player_id = players.player_id |
### Response:
| select count ( players.* ) , players.hand from players group by players.hand |
battle_death | 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 NatSQL: How many ships ended up being 'Captured'? | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select count ( ship.* ) from ship where ship.disposition_of_ship = "Captured" |
battle_death | 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 NatSQL: List the name and tonnage ordered by in descending alphaetical order for the names. | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select ship.name , ship.tonnage from ship order by ship.name desc |
battle_death | 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 NatSQL: List the name, date and result of each battle. | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select battle.name , battle.date from battle |
battle_death | 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 NatSQL: What is maximum and minimum death toll caused each time? | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select max ( death.killed ) , min ( death.killed ) from death |
battle_death | 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 NatSQL: What is the average number of injuries caused each time? | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select avg ( death.injured ) from death |
battle_death | 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 NatSQL: What are the death and injury situations caused by the ship with tonnage 't'? | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select death.killed , death.injured from ship where ship.tonnage = "t" |
battle_death | 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 NatSQL: What are the name and results of the battles when the bulgarian commander is not 'Boril' | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select battle.name , battle.result from battle where battle.bulgarian_commander != "Boril" |
battle_death | 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 NatSQL: What are the different ids and names of the battles that lost any 'Brig' type shipes? | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select distinct battle.id , battle.name from battle where ship.ship_type = "Brig" |
battle_death | 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 NatSQL: What are the ids and names of the battles that led to more than 10 people killed in total. | battle : id , name , date , bulgarian_commander , latin_commander , result | ship : lost_in_battle , id , name , tonnage , ship_type , location , disposition_of_ship | death : caused_by_ship_id , id , note , killed , injured | ship.lost_in_battle = battle.id | death.caused_by_ship_id = ship.id |
### Response:
| select battle.id , battle.name from battle where sum ( death.killed ) > 10 group by battle.id |