db_id
stringclasses 31
values | schema
stringclasses 22
values | schemaComEx
stringclasses 22
values | question
stringlengths 18
181
| query
stringlengths 20
577
| answer
stringlengths 14
41.7k
⌀ | complexity
stringclasses 4
values | distinct
bool 2
classes | like
bool 2
classes | between
bool 2
classes | order_by
bool 2
classes | limit
bool 2
classes | grouby_by
bool 2
classes | having
bool 2
classes | single_join
bool 2
classes | multiple_join
bool 2
classes | multiple_select
bool 2
classes | intersect
bool 2
classes | except
bool 2
classes | union
bool 2
classes |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wta_1 | null | null | Find the name of tourney that has more than 10 matches. | SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the names of tournaments that have more than 10 matches? | SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | List the names of all winners who played in both 2013 and 2016. | SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the names of players who won in both 2013 and 2016? | SELECT winner_name FROM matches WHERE YEAR = 2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR = 2016 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | List the number of all matches who played in years of 2013 or 2016. | SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | How many matches were played in 2013 or 2016? | SELECT count(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the country code and first name of the players who won in both tourney WTA Championships and Australian Open? | SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open' | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the first names and country codes for players who won both the WTA Championships and the Australian Open? | SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open' | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the first name and country code of the oldest player. | SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What is the first name and country code of the oldest player? | SELECT first_name , country_code FROM players ORDER BY birth_date LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | List the first and last name of all players in the order of birth date. | SELECT first_name , last_name FROM players ORDER BY birth_date | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the full names of all players, sorted by birth date? | SELECT first_name , last_name FROM players ORDER BY birth_date | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | List the first and last name of all players who are left / L hand in the order of birth date. | SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the full names of all left handed players, in order of birth date? | SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the first name and country code of the player who did the most number of tours. | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What is the first name and country code of the player with the most tours? | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the year that has the most number of matches. | SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Which year had the most matches? | SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the name and rank points of the winner who won the most times. | SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What is the name of the winner who has won the most matches, and how many rank points does this player have? | SELECT winner_name , winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the name of the winner who has the highest rank points and participated in the Australian Open tourney. | SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What is the name of the winner with the most rank points who participated in the Australian Open tournament? | SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | find the names of loser and winner who played in the match with greatest number of minutes. | SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the names of the winner and loser who played in the longest match? | SELECT winner_name , loser_name FROM matches ORDER BY minutes DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the average ranking for each player and their first name. | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the first names of all players, and their average rankings? | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the total ranking points for each player and their first name. | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the first names of all players, and their total ranking points? | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | find the number of players for each country. | SELECT count(*) , country_code FROM players GROUP BY country_code | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | How many players are from each country? | SELECT count(*) , country_code FROM players GROUP BY country_code | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | find the code of the country where has the greatest number of players. | SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What is the code of the country with the most players? | SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the codes of countries that have more than 50 players. | SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the codes of countries with more than 50 players? | SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the total number of tours for each ranking date. | SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | How many total tours were there for each ranking date? | SELECT sum(tours) , ranking_date FROM rankings GROUP BY ranking_date | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the number of matches happened in each year. | SELECT count(*) , YEAR FROM matches GROUP BY YEAR | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | How many matches were played in each year? | SELECT count(*) , YEAR FROM matches GROUP BY YEAR | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the name and rank of the 3 youngest winners across all matches. | SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What are the names and ranks of the three youngest winners across all matches? | SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | How many different winners both participated in the WTA Championships and were left handed? | SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L' | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the number of left handed winners who participated in the WTA Championships. | SELECT count(DISTINCT winner_name) FROM matches WHERE tourney_name = 'WTA Championships' AND winner_hand = 'L' | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the first name, country code and birth date of the winner who has the highest rank points in all matches. | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | What is the first name, country code, and birth date of the player with the most winner rank points across all matches? | 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 | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | Find the number of players for each hand type. | SELECT count(*) , hand FROM players GROUP BY hand | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |
wta_1 | null | null | How many players are there for each hand type? | SELECT count(*) , hand FROM players GROUP BY hand | null | null | null | null | null | null | null | null | null | null | null | null | null | null | null |