richardr1126/spider-natsql-context-validation huggingface dataset:
### 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

### Instruction:

Convert text to NatSQL: What is the ship id and name that caused most total injuries? | 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.id , ship.name from death  group by ship.id  order by count ( death.* )  desc limit 1

### Instruction:

Convert text to NatSQL: What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'? | 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 from battle  where  battle.bulgarian_commander = "Kaloyan"  and  battle.latin_commander = "Baldwin I"

### Instruction:

Convert text to NatSQL: How many different results are there for the battles? | 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 (  distinct battle.result )  from battle
### Instruction:

Convert text to NatSQL: How many battles did not lose any ship with tonnage '225'? | 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 ( battle.* )  from battle  where  @.@ not in ship.*  and  ship.tonnage = "225"

### Instruction:

Convert text to NatSQL: List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta' | 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  where  ship.name = "Lettice"  and  ship.name = "HMS Atalanta"

### Instruction:

Convert text to NatSQL: Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'. | 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 , battle.bulgarian_commander from battle  where  except_  @.@ is ship.*  and  ship.location = "English Channel"

### Instruction:

Convert text to NatSQL: What are the notes of the death events which has substring 'East'? | 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.note from death  where  death.note like "%East%"
### Instruction:

Convert text to NatSQL: what are all the addresses including line 1 and line 2? | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | courses : course_id , course_name , course_description , other_details | departments : department_id , department_name , department_description , other_details | degree_programs : degree_program_id , department_id , degree_summary_name , degree_summary_description , other_details | sections : section_id , course_id , section_name , section_description , other_details | semesters : semester_id , semester_name , semester_description , other_details | students : student_id , current_address_id , permanent_address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , ssn , date_first_registered , date_left , other_student_details | student_enrolment : student_enrolment_id , degree_program_id , semester_id , student_id , other_details | student_enrolment_courses : student_course_id , course_id , student_enrolment_id | transcripts : transcript_id , transcript_date , other_details | transcript_contents : student_course_id , transcript_id | degree_programs.department_id = departments.department_id | sections.course_id = courses.course_id | students.permanent_address_id = addresses.address_id | students.current_address_id = addresses.address_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | student_enrolment_courses.course_id = courses.course_id | transcript_contents.transcript_id = transcripts.transcript_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id | 

### Response:

select addresses.line_1 , addresses.line_2 from addresses
### Instruction:

Convert text to NatSQL: What is the first and second line for all addresses? | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | courses : course_id , course_name , course_description , other_details | departments : department_id , department_name , department_description , other_details | degree_programs : degree_program_id , department_id , degree_summary_name , degree_summary_description , other_details | sections : section_id , course_id , section_name , section_description , other_details | semesters : semester_id , semester_name , semester_description , other_details | students : student_id , current_address_id , permanent_address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , ssn , date_first_registered , date_left , other_student_details | student_enrolment : student_enrolment_id , degree_program_id , semester_id , student_id , other_details | student_enrolment_courses : student_course_id , course_id , student_enrolment_id | transcripts : transcript_id , transcript_date , other_details | transcript_contents : student_course_id , transcript_id | degree_programs.department_id = departments.department_id | sections.course_id = courses.course_id | students.permanent_address_id = addresses.address_id | students.current_address_id = addresses.address_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | student_enrolment_courses.course_id = courses.course_id | transcript_contents.transcript_id = transcripts.transcript_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id | 

### Response:

select addresses.line_1 , addresses.line_2 from addresses
### Instruction:

Convert text to NatSQL: How many courses in total are listed? | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | courses : course_id , course_name , course_description , other_details | departments : department_id , department_name , department_description , other_details | degree_programs : degree_program_id , department_id , degree_summary_name , degree_summary_description , other_details | sections : section_id , course_id , section_name , section_description , other_details | semesters : semester_id , semester_name , semester_description , other_details | students : student_id , current_address_id , permanent_address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , ssn , date_first_registered , date_left , other_student_details | student_enrolment : student_enrolment_id , degree_program_id , semester_id , student_id , other_details | student_enrolment_courses : student_course_id , course_id , student_enrolment_id | transcripts : transcript_id , transcript_date , other_details | transcript_contents : student_course_id , transcript_id | degree_programs.department_id = departments.department_id | sections.course_id = courses.course_id | students.permanent_address_id = addresses.address_id | students.current_address_id = addresses.address_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | student_enrolment_courses.course_id = courses.course_id | transcript_contents.transcript_id = transcripts.transcript_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id | 

### Response:

select count ( courses.* )  from courses
### Instruction:

Convert text to NatSQL: How many courses are there? | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | courses : course_id , course_name , course_description , other_details | departments : department_id , department_name , department_description , other_details | degree_programs : degree_program_id , department_id , degree_summary_name , degree_summary_description , other_details | sections : section_id , course_id , section_name , section_description , other_details | semesters : semester_id , semester_name , semester_description , other_details | students : student_id , current_address_id , permanent_address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , ssn , date_first_registered , date_left , other_student_details | student_enrolment : student_enrolment_id , degree_program_id , semester_id , student_id , other_details | student_enrolment_courses : student_course_id , course_id , student_enrolment_id | transcripts : transcript_id , transcript_date , other_details | transcript_contents : student_course_id , transcript_id | degree_programs.department_id = departments.department_id | sections.course_id = courses.course_id | students.permanent_address_id = addresses.address_id | students.current_address_id = addresses.address_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | student_enrolment_courses.course_id = courses.course_id | transcript_contents.transcript_id = transcripts.transcript_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id | 

### Response:

select count ( courses.* )  from courses
### Instruction:

Convert text to NatSQL: How is the math course described? | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | courses : course_id , course_name , course_description , other_details | departments : department_id , department_name , department_description , other_details | degree_programs : degree_program_id , department_id , degree_summary_name , degree_summary_description , other_details | sections : section_id , course_id , section_name , section_description , other_details | semesters : semester_id , semester_name , semester_description , other_details | students : student_id , current_address_id , permanent_address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , ssn , date_first_registered , date_left , other_student_details | student_enrolment : student_enrolment_id , degree_program_id , semester_id , student_id , other_details | student_enrolment_courses : student_course_id , course_id , student_enrolment_id | transcripts : transcript_id , transcript_date , other_details | transcript_contents : student_course_id , transcript_id | degree_programs.department_id = departments.department_id | sections.course_id = courses.course_id | students.permanent_address_id = addresses.address_id | students.current_address_id = addresses.address_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | student_enrolment_courses.course_id = courses.course_id | transcript_contents.transcript_id = transcripts.transcript_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id | 

### Response:

select courses.course_description from courses  where  courses.course_name = "math"
### Instruction:

Convert text to NatSQL: What are the descriptions for all the math courses? | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | courses : course_id , course_name , course_description , other_details | departments : department_id , department_name , department_description , other_details | degree_programs : degree_program_id , department_id , degree_summary_name , degree_summary_description , other_details | sections : section_id , course_id , section_name , section_description , other_details | semesters : semester_id , semester_name , semester_description , other_details | students : student_id , current_address_id , permanent_address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , ssn , date_first_registered , date_left , other_student_details | student_enrolment : student_enrolment_id , degree_program_id , semester_id , student_id , other_details | student_enrolment_courses : student_course_id , course_id , student_enrolment_id | transcripts : transcript_id , transcript_date , other_details | transcript_contents : student_course_id , transcript_id | degree_programs.department_id = departments.department_id | sections.course_id = courses.course_id | students.permanent_address_id = addresses.address_id | students.current_address_id = addresses.address_id | student_enrolment.student_id = students.student_id | student_enrolment.semester_id = semesters.semester_id | student_enrolment.degree_program_id = degree_programs.degree_program_id | student_enrolment_courses.student_enrolment_id = student_enrolment.student_enrolment_id | student_enrolment_courses.course_id = courses.course_id | transcript_contents.transcript_id = transcripts.transcript_id | transcript_contents.student_course_id = student_enrolment_courses.student_course_id | 

### Response:

select courses.course_description from courses  where  courses.course_name = "math"