richardr1126/spider-natsql-context-validation huggingface dataset:
### Instruction:

Convert text to NatSQL: What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ? | 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  teacher.Hometown != "little lever urban district"

### Instruction:

Convert text to NatSQL: Show the name of teachers aged either 32 or 33? | 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  teacher.Age = 32  or  teacher.Age = 33

### Instruction:

Convert text to NatSQL: What are the names of the teachers who are aged either 32 or 33? | 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  teacher.Age = 32  or  teacher.Age = 33

### Instruction:

Convert text to NatSQL: What is the hometown of the youngest 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.Hometown from teacher  order by teacher.Age asc limit 1

### Instruction:

Convert text to NatSQL: Where is the youngest teacher from? | 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.Hometown from teacher  order by teacher.Age asc limit 1

### Instruction:

Convert text to NatSQL: Show different hometown of teachers and the number of teachers from each hometown. | 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.Hometown , count ( teacher.* )  from teacher  group by teacher.Hometown

### Instruction:

Convert text to NatSQL: For each hometown, how many teachers are there? | 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.Hometown , count ( teacher.* )  from teacher  group by teacher.Hometown
### Instruction:

Convert text to NatSQL: List the most common hometown of teachers. | 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.Hometown from teacher  group by teacher.Hometown  order by count ( teacher.* )  desc limit 1

### Instruction:

Convert text to NatSQL: What is the most commmon hometowns for teachers? | 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.Hometown from teacher  group by teacher.Hometown  order by count ( teacher.* )  desc limit 1

### Instruction:

Convert text to NatSQL: Show the hometowns shared by at least two teachers. | 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.Hometown from teacher  where  count ( teacher.* )  >= 2  group by teacher.Hometown

### Instruction:

Convert text to NatSQL: What are the towns from which at least two teachers come from? | 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.Hometown from teacher  where  count ( teacher.* )  >= 2  group by teacher.Hometown

### Instruction:

Convert text to NatSQL: Show names of teachers and the courses they are arranged to 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

### 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

### 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
### 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

### 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"

### 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"

### 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

### 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

### 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

### 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
### 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.*

### 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.*
### 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

### 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

### 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

### 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

### 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

### 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
### 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"

### 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

### 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

### 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

### 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

### 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.*
### 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

### 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

### 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

### 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

### 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

### 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
### 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

### 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

### 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
### 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

### 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"

### 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"
### 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

### 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

### 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
### 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

### 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

### 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
### 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

### 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

### 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
### 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

### 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

### 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
### 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

### 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

### 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
### 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

### 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"

### 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"
### 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

### 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

### 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
### 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

### 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

### 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
### 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

### 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

### 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