Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the first name and country code of the player with the most tours?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id ORDER BY T2.tours DESC LIMIT 1</SQL_QUERY>

Question: SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id ORDER BY T2.tours DESC LIMIT 1

Question: What is the first name and country code of the player with the most tours?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the year that has the most number of matches.</question>
[SQL]:

Output: <SQL_QUERY>SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1

Question: Find the year that has the most number of matches.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Which year had the most matches?</question>
[SQL]:

Output: <SQL_QUERY>SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1

Question: Which year had the most matches?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name and rank points of the winner who won the most times.</question>
[SQL]:

Output: <SQL_QUERY>SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1

Question: Find the name and rank points of the winner who won the most times.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the winner who has won the most matches, and how many rank points does this player have?</question>
[SQL]:

Output: <SQL_QUERY>SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1

Question: What is the name of the winner who has won the most matches, and how many rank points does this player have?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.</question>
[SQL]:

Output: <SQL_QUERY>SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1</SQL_QUERY>

Question: SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1

Question: Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the name of the winner with the most rank points who participated in the Australian Open tournament?</question>
[SQL]:

Output: <SQL_QUERY>SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1</SQL_QUERY>

Question: SELECT winner_name FROM matches WHERE tourney_name  =  'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1

Question: What is the name of the winner with the most rank points who participated in the Australian Open tournament?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>find the names of loser and winner who played in the match with greatest number of minutes.</question>
[SQL]:

Output: <SQL_QUERY>SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1</SQL_QUERY>

Question: SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1

Question: find the names of loser and winner who played in the match with greatest number of minutes.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names of the winner and loser who played in the longest match?</question>
[SQL]:

Output: <SQL_QUERY>SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1</SQL_QUERY>

Question: SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1

Question: What are the names of the winner and loser who played in the longest match?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the average ranking for each player and their first name.</question>
[SQL]:

Output: <SQL_QUERY>SELECT avg(ranking) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name</SQL_QUERY>

Question: SELECT avg(ranking) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name

Question: Find the average ranking for each player and their first name.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first names of all players, and their average rankings?</question>
[SQL]:

Output: <SQL_QUERY>SELECT avg(ranking) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name</SQL_QUERY>

Question: SELECT avg(ranking) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name

Question: What are the first names of all players, and their average rankings?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the total ranking points for each player and their first name.</question>
[SQL]:

Output: <SQL_QUERY>SELECT sum(ranking_points) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name</SQL_QUERY>

Question: SELECT sum(ranking_points) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name

Question: Find the total ranking points for each player and their first name.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the first names of all players, and their total ranking points?</question>
[SQL]:

Output: <SQL_QUERY>SELECT sum(ranking_points) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name</SQL_QUERY>

Question: SELECT sum(ranking_points) ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.first_name

Question: What are the first names of all players, and their total ranking points?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>find the number of players for each country.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  country_code FROM players GROUP BY country_code</SQL_QUERY>

Question: SELECT count(*) ,  country_code FROM players GROUP BY country_code

Question: find the number of players for each country.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many players are from each country?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  country_code FROM players GROUP BY country_code</SQL_QUERY>

Question: SELECT count(*) ,  country_code FROM players GROUP BY country_code

Question: How many players are from each country?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>find the code of the country where has the greatest number of players.</question>
[SQL]:

Output: <SQL_QUERY>SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1

Question: find the code of the country where has the greatest number of players.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the code of the country with the most players?</question>
[SQL]:

Output: <SQL_QUERY>SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1

Question: What is the code of the country with the most players?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the codes of countries that have more than 50 players.</question>
[SQL]:

Output: <SQL_QUERY>SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50</SQL_QUERY>

Question: SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50

Question: Find the codes of countries that have more than 50 players.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the codes of countries with more than 50 players?</question>
[SQL]:

Output: <SQL_QUERY>SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50</SQL_QUERY>

Question: SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50

Question: What are the codes of countries with more than 50 players?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the total number of tours for each ranking date.</question>
[SQL]:

Output: <SQL_QUERY>SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date</SQL_QUERY>

Question: SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date

Question: Find the total number of tours for each ranking date.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many total tours were there for each ranking date?</question>
[SQL]:

Output: <SQL_QUERY>SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date</SQL_QUERY>

Question: SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date

Question: How many total tours were there for each ranking date?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of matches happened in each year.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR</SQL_QUERY>

Question: SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR

Question: Find the number of matches happened in each year.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many matches were played in each year?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR</SQL_QUERY>

Question: SELECT count(*) ,  YEAR FROM matches GROUP BY YEAR

Question: How many matches were played in each year?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the name and rank of the 3 youngest winners across all matches.</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3</SQL_QUERY>

Question: SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3

Question: Find the name and rank of the 3 youngest winners across all matches.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the names and ranks of the three youngest winners across all matches?</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3</SQL_QUERY>

Question: SELECT DISTINCT winner_name ,  winner_rank FROM matches ORDER BY winner_age LIMIT 3

Question: What are the names and ranks of the three youngest winners across all matches?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many different winners both participated in the WTA Championships and were left handed?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'</SQL_QUERY>

Question: SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'

Question: How many different winners both participated in the WTA Championships and were left handed?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of left handed winners who participated in the WTA Championships.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'</SQL_QUERY>

Question: SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name  =  'WTA Championships' AND winner_hand  =  'L'

Question: Find the number of left handed winners who participated in the WTA Championships.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the first name, country code and birth date of the winner who has the highest rank points in all matches.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.first_name ,  T1.country_code ,  T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1</SQL_QUERY>

Question: SELECT T1.first_name ,  T1.country_code ,  T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1

Question: Find the first name, country code and birth date of the winner who has the highest rank points in all matches.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the first name, country code, and birth date of the player with the most winner rank points across all matches?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.first_name ,  T1.country_code ,  T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1</SQL_QUERY>

Question: SELECT T1.first_name ,  T1.country_code ,  T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1

Question: What is the first name, country code, and birth date of the player with the most winner rank points across all matches?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Find the number of players for each hand type.</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  hand FROM players GROUP BY hand</SQL_QUERY>

Question: SELECT count(*) ,  hand FROM players GROUP BY hand

Question: Find the number of players for each hand type.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | wta_1 |  players : player_id (text) , first_name (number) , last_name (text) , hand (text) , birth_date (text) , country_code (time) | matches : best_of (text) , draw_size (number) , loser_age (text) , loser_entry (text) , loser_hand (text) , loser_ht (time) , loser_id (text) , loser_ioc (number) , loser_name (number) , loser_rank (number) , loser_rank_points (text) , loser_seed (text) , match_num (number) , minutes (number) , round (text) , score (text) , surface (number) , tourney_date (number) , tourney_id (number) , tourney_level (number) , tourney_name (number) , winner_age (text) , winner_entry (text) , winner_hand (text) , winner_ht (time) , winner_id (text) , winner_ioc (text) , winner_name (text) , winner_rank (number) , winner_rank_points (text) , winner_seed (text) , year (number) | rankings : ranking_date (text) , ranking (number) , player_id (text) , ranking_points (text) , tours (text);</schema>"
<primary_keys>[Primary Keys]: players : player_id</primary_keys>"
<foreign_keys>[Foreign Keys]: matches : winner_id = players : player_id | matches : loser_id = players : player_id | rankings : player_id = players : player_id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many players are there for each hand type?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) ,  hand FROM players GROUP BY hand</SQL_QUERY>

Question: SELECT count(*) ,  hand FROM players GROUP BY hand

Question: How many players are there for each hand type?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many ships ended up being 'Captured'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM ship WHERE disposition_of_ship  =  'Captured'</SQL_QUERY>

Question: SELECT count(*) FROM ship WHERE disposition_of_ship  =  'Captured'

Question: How many ships ended up being 'Captured'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name and tonnage ordered by in descending alphaetical order for the names.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  tonnage FROM ship ORDER BY name DESC</SQL_QUERY>

Question: SELECT name ,  tonnage FROM ship ORDER BY name DESC

Question: List the name and tonnage ordered by in descending alphaetical order for the names.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name, date and result of each battle.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  date FROM battle</SQL_QUERY>

Question: SELECT name ,  date FROM battle

Question: List the name, date and result of each battle.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is maximum and minimum death toll caused each time?</question>
[SQL]:

Output: <SQL_QUERY>SELECT max(killed) ,  min(killed) FROM death</SQL_QUERY>

Question: SELECT max(killed) ,  min(killed) FROM death

Question: What is maximum and minimum death toll caused each time?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the average number of injuries caused each time?</question>
[SQL]:

Output: <SQL_QUERY>SELECT avg(injured) FROM death</SQL_QUERY>

Question: SELECT avg(injured) FROM death

Question: What is the average number of injuries caused each time?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the death and injury situations caused by the ship with tonnage 't'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.killed ,  T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id  =  T2.id WHERE T2.tonnage  =  't'</SQL_QUERY>

Question: SELECT T1.killed ,  T1.injured FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id  =  T2.id WHERE T2.tonnage  =  't'

Question: What are the death and injury situations caused by the ship with tonnage 't'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the name and results of the battles when the bulgarian commander is not 'Boril'</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  RESULT FROM battle WHERE bulgarian_commander != 'Boril'</SQL_QUERY>

Question: SELECT name ,  RESULT FROM battle WHERE bulgarian_commander != 'Boril'

Question: What are the name and results of the battles when the bulgarian commander is not 'Boril'


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the different ids and names of the battles that lost any 'Brig' type shipes?</question>
[SQL]:

Output: <SQL_QUERY>SELECT DISTINCT T1.id ,  T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.ship_type  =  'Brig'</SQL_QUERY>

Question: SELECT DISTINCT T1.id ,  T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.ship_type  =  'Brig'

Question: What are the different ids and names of the battles that lost any 'Brig' type shipes?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the ids and names of the battles that led to more than 10 people killed in total.</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.id ,  T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle JOIN death AS T3 ON T2.id  =  T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed)  >  10</SQL_QUERY>

Question: SELECT T1.id ,  T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle JOIN death AS T3 ON T2.id  =  T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed)  >  10

Question: What are the ids and names of the battles that led to more than 10 people killed in total.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the ship id and name that caused most total injuries?</question>
[SQL]:

Output: <SQL_QUERY>SELECT T2.id ,  T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id  =  T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1</SQL_QUERY>

Question: SELECT T2.id ,  T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id  =  T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1

Question: What is the ship id and name that caused most total injuries?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT name FROM battle WHERE bulgarian_commander  =  'Kaloyan' AND latin_commander  =  'Baldwin I'</SQL_QUERY>

Question: SELECT name FROM battle WHERE bulgarian_commander  =  'Kaloyan' AND latin_commander  =  'Baldwin I'

Question: What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many different results are there for the battles?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(DISTINCT RESULT) FROM battle</SQL_QUERY>

Question: SELECT count(DISTINCT RESULT) FROM battle

Question: How many different results are there for the battles?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many battles did not lose any ship with tonnage '225'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage  =  '225' );</SQL_QUERY>

Question: SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage  =  '225' );

Question: How many battles did not lose any ship with tonnage '225'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'</question>
[SQL]:

Output: <SQL_QUERY>SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'Lettice' INTERSECT SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'HMS Atalanta'</SQL_QUERY>

Question: SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'Lettice' INTERSECT SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'HMS Atalanta'

Question: List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.</question>
[SQL]:

Output: <SQL_QUERY>SELECT name ,  RESULT ,  bulgarian_commander FROM battle EXCEPT SELECT T1.name ,  T1.result ,  T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.location  =  'English Channel'</SQL_QUERY>

Question: SELECT name ,  RESULT ,  bulgarian_commander FROM battle EXCEPT SELECT T1.name ,  T1.result ,  T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.location  =  'English Channel'

Question: Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | battle_death |  battle : id (text) , name (number) , date (text) , bulgarian_commander (text) , latin_commander (text) , result (text) | ship : lost_in_battle (text) , id (number) , name (text) , tonnage (text) , ship_type (text) , location (text) , disposition_of_ship (text) | death : caused_by_ship_id (text) , id (number) , note (text) , killed (text) , injured (text);</schema>"
<primary_keys>[Primary Keys]: battle : id, ship : id, death : id</primary_keys>"
<foreign_keys>[Foreign Keys]: ship : lost_in_battle = battle : id | death : caused_by_ship_id = ship : id</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the notes of the death events which has substring 'East'?</question>
[SQL]:

Output: <SQL_QUERY>SELECT note FROM death WHERE note LIKE '%East%'</SQL_QUERY>

Question: SELECT note FROM death WHERE note LIKE '%East%'

Question: What are the notes of the death events which has substring 'East'?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | student_transcripts_tracking |  Addresses : address_id (text) , line_1 (number) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (text) , course_name (number) , course_description (text) , other_details (text) | Departments : department_id (text) , department_name (number) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (text) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (text) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (text) , semester_name (number) , semester_description (text) , other_details (text) | Students : student_id (text) , current_address_id (number) , permanent_address_id (text) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (text) , date_left (number) , other_student_details (text) | Student_Enrolment : student_enrolment_id (text) , degree_program_id (number) , semester_id (text) , student_id (text) , other_details (text) | Student_Enrolment_Courses : student_course_id (text) , course_id (number) , student_enrolment_id (text) | Transcripts : transcript_id (text) , transcript_date (number) , other_details (text) | Transcript_Contents : student_course_id (text) , transcript_id (number);</schema>"
<primary_keys>[Primary Keys]: addresses : address_id, courses : course_id, departments : department_id, degree_programs : degree_program_id, sections : section_id, semesters : semester_id, students : student_id, student_enrolment : student_enrolment_id, student_enrolment_courses : student_course_id, transcripts : transcript_id</primary_keys>"
<foreign_keys>[Foreign Keys]: 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</foreign_keys>"
Answer the following question with a SQL Statement:<question>what are all the addresses including line 1 and line 2?</question>
[SQL]:

Output: <SQL_QUERY>SELECT line_1 ,  line_2 FROM addresses</SQL_QUERY>

Question: SELECT line_1 ,  line_2 FROM addresses

Question: what are all the addresses including line 1 and line 2?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | student_transcripts_tracking |  Addresses : address_id (text) , line_1 (number) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (text) , course_name (number) , course_description (text) , other_details (text) | Departments : department_id (text) , department_name (number) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (text) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (text) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (text) , semester_name (number) , semester_description (text) , other_details (text) | Students : student_id (text) , current_address_id (number) , permanent_address_id (text) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (text) , date_left (number) , other_student_details (text) | Student_Enrolment : student_enrolment_id (text) , degree_program_id (number) , semester_id (text) , student_id (text) , other_details (text) | Student_Enrolment_Courses : student_course_id (text) , course_id (number) , student_enrolment_id (text) | Transcripts : transcript_id (text) , transcript_date (number) , other_details (text) | Transcript_Contents : student_course_id (text) , transcript_id (number);</schema>"
<primary_keys>[Primary Keys]: addresses : address_id, courses : course_id, departments : department_id, degree_programs : degree_program_id, sections : section_id, semesters : semester_id, students : student_id, student_enrolment : student_enrolment_id, student_enrolment_courses : student_course_id, transcripts : transcript_id</primary_keys>"
<foreign_keys>[Foreign Keys]: 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</foreign_keys>"
Answer the following question with a SQL Statement:<question>What is the first and second line for all addresses?</question>
[SQL]:

Output: <SQL_QUERY>SELECT line_1 ,  line_2 FROM addresses</SQL_QUERY>

Question: SELECT line_1 ,  line_2 FROM addresses

Question: What is the first and second line for all addresses?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | student_transcripts_tracking |  Addresses : address_id (text) , line_1 (number) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (text) , course_name (number) , course_description (text) , other_details (text) | Departments : department_id (text) , department_name (number) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (text) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (text) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (text) , semester_name (number) , semester_description (text) , other_details (text) | Students : student_id (text) , current_address_id (number) , permanent_address_id (text) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (text) , date_left (number) , other_student_details (text) | Student_Enrolment : student_enrolment_id (text) , degree_program_id (number) , semester_id (text) , student_id (text) , other_details (text) | Student_Enrolment_Courses : student_course_id (text) , course_id (number) , student_enrolment_id (text) | Transcripts : transcript_id (text) , transcript_date (number) , other_details (text) | Transcript_Contents : student_course_id (text) , transcript_id (number);</schema>"
<primary_keys>[Primary Keys]: addresses : address_id, courses : course_id, departments : department_id, degree_programs : degree_program_id, sections : section_id, semesters : semester_id, students : student_id, student_enrolment : student_enrolment_id, student_enrolment_courses : student_course_id, transcripts : transcript_id</primary_keys>"
<foreign_keys>[Foreign Keys]: 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</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many courses in total are listed?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Courses</SQL_QUERY>

Question: SELECT count(*) FROM Courses

Question: How many courses in total are listed?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | student_transcripts_tracking |  Addresses : address_id (text) , line_1 (number) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (text) , course_name (number) , course_description (text) , other_details (text) | Departments : department_id (text) , department_name (number) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (text) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (text) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (text) , semester_name (number) , semester_description (text) , other_details (text) | Students : student_id (text) , current_address_id (number) , permanent_address_id (text) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (text) , date_left (number) , other_student_details (text) | Student_Enrolment : student_enrolment_id (text) , degree_program_id (number) , semester_id (text) , student_id (text) , other_details (text) | Student_Enrolment_Courses : student_course_id (text) , course_id (number) , student_enrolment_id (text) | Transcripts : transcript_id (text) , transcript_date (number) , other_details (text) | Transcript_Contents : student_course_id (text) , transcript_id (number);</schema>"
<primary_keys>[Primary Keys]: addresses : address_id, courses : course_id, departments : department_id, degree_programs : degree_program_id, sections : section_id, semesters : semester_id, students : student_id, student_enrolment : student_enrolment_id, student_enrolment_courses : student_course_id, transcripts : transcript_id</primary_keys>"
<foreign_keys>[Foreign Keys]: 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</foreign_keys>"
Answer the following question with a SQL Statement:<question>How many courses are there?</question>
[SQL]:

Output: <SQL_QUERY>SELECT count(*) FROM Courses</SQL_QUERY>

Question: SELECT count(*) FROM Courses

Question: How many courses are there?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | student_transcripts_tracking |  Addresses : address_id (text) , line_1 (number) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (text) , course_name (number) , course_description (text) , other_details (text) | Departments : department_id (text) , department_name (number) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (text) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (text) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (text) , semester_name (number) , semester_description (text) , other_details (text) | Students : student_id (text) , current_address_id (number) , permanent_address_id (text) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (text) , date_left (number) , other_student_details (text) | Student_Enrolment : student_enrolment_id (text) , degree_program_id (number) , semester_id (text) , student_id (text) , other_details (text) | Student_Enrolment_Courses : student_course_id (text) , course_id (number) , student_enrolment_id (text) | Transcripts : transcript_id (text) , transcript_date (number) , other_details (text) | Transcript_Contents : student_course_id (text) , transcript_id (number);</schema>"
<primary_keys>[Primary Keys]: addresses : address_id, courses : course_id, departments : department_id, degree_programs : degree_program_id, sections : section_id, semesters : semester_id, students : student_id, student_enrolment : student_enrolment_id, student_enrolment_courses : student_course_id, transcripts : transcript_id</primary_keys>"
<foreign_keys>[Foreign Keys]: 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</foreign_keys>"
Answer the following question with a SQL Statement:<question>How is the math course described?</question>
[SQL]:

Output: <SQL_QUERY>SELECT course_description FROM Courses WHERE course_name  =  'math'</SQL_QUERY>

Question: SELECT course_description FROM Courses WHERE course_name  =  'math'

Question: How is the math course described?


Input:
This is a task converting text into SQL statements. We will first give the dataset schema and column types, primary keys and foreign keys and then ask a question in text. You are asked to generate SQL statement in SQLite.
 <schema>[Schema (values) (types)]: | student_transcripts_tracking |  Addresses : address_id (text) , line_1 (number) , line_2 (text) , line_3 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) , other_address_details (text) | Courses : course_id (text) , course_name (number) , course_description (text) , other_details (text) | Departments : department_id (text) , department_name (number) , department_description (text) , other_details (text) | Degree_Programs : degree_program_id (text) , department_id (number) , degree_summary_name (text) , degree_summary_description (text) , other_details (text) | Sections : section_id (text) , course_id (number) , section_name (text) , section_description (text) , other_details (text) | Semesters : semester_id (text) , semester_name (number) , semester_description (text) , other_details (text) | Students : student_id (text) , current_address_id (number) , permanent_address_id (text) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , ssn (text) , date_first_registered (text) , date_left (number) , other_student_details (text) | Student_Enrolment : student_enrolment_id (text) , degree_program_id (number) , semester_id (text) , student_id (text) , other_details (text) | Student_Enrolment_Courses : student_course_id (text) , course_id (number) , student_enrolment_id (text) | Transcripts : transcript_id (text) , transcript_date (number) , other_details (text) | Transcript_Contents : student_course_id (text) , transcript_id (number);</schema>"
<primary_keys>[Primary Keys]: addresses : address_id, courses : course_id, departments : department_id, degree_programs : degree_program_id, sections : section_id, semesters : semester_id, students : student_id, student_enrolment : student_enrolment_id, student_enrolment_courses : student_course_id, transcripts : transcript_id</primary_keys>"
<foreign_keys>[Foreign Keys]: 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</foreign_keys>"
Answer the following question with a SQL Statement:<question>What are the descriptions for all the math courses?</question>
[SQL]:

Output: <SQL_QUERY>SELECT course_description FROM Courses WHERE course_name  =  'math'</SQL_QUERY>

Question: SELECT course_description FROM Courses WHERE course_name  =  'math'

Question: What are the descriptions for all the math courses?