SecureSQL / training-data /test_set.tsv
DeanGumas's picture
removing evil test_set query and updating validation to output metrics more often
7552ccc
natural_query sql_query result is_nba
How many spanish (ESP) players are there? SELECT COUNT(*) AS spanish_players FROM players WHERE ioc = 'ESP'; 3026 False
How many distinct players appear in the rankings table? SELECT COUNT(DISTINCT player) AS distinct_players FROM rankings; 16174 False
How many times did the Los Angeles Clippers lose at home in the 2002 season despite recording more steals and blocks than their opponent? SELECT COUNT(*) FROM game g WHERE g.team_abbreviation_home = 'LAC' AND g.wl_home = 'L' AND g.stl_home > g.stl_away AND g.blk_home > g.blk_away AND g.season_id = '22002'; 4 True
How many times have the Boston Celtics won an away game by at least 20 points? SELECT COUNT(*) FROM game WHERE team_abbreviation_away = 'BOS' AND wl_away = 'W' AND (pts_away - pts_home) >= 20; 179 True
Show the most successful player by win count SELECT winner_name, COUNT(*) as total_wins FROM matches WHERE winner_name IS NOT NULL GROUP BY winner_name ORDER BY total_wins DESC LIMIT 1; Roger Federer|1305 False
In which season did the Chicago Bulls have the highest average ft_pct at home? SELECT season_id, AVG(ft_pct_home) as avg_stat FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2016.0 True
Which team was most often held under 60 points in a game? SELECT team FROM (SELECT team_abbreviation_home AS team, pts_home AS pts FROM game UNION ALL SELECT team_abbreviation_away, pts_away FROM game) WHERE pts < 60 GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; BOS True
Find the name of the player ranked #1 on the date 2010-01-01. SELECT p.name FROM players p JOIN rankings r ON p.player_id = r.player WHERE r.rank = 1 AND r.ranking_date > 20100101 AND r.ranking_date < 20100108; Roger Federer False
How many lead changes occurred in games where the Denver Nuggets played away? SELECT SUM(lead_changes) as total_lead_changes FROM other_stats WHERE team_abbreviation_away = 'DEN'; 5828.0 True
How many different countries have players who won matches at the US Open? SELECT COUNT(DISTINCT winner_ioc) FROM matches WHERE tourney_name = 'US Open'; 90 False
What is the total number of steals recorded by the Miami Heat in games against the Boston Celtics? SELECT SUM(CASE WHEN team_name_home = 'Miami Heat' THEN stl_home ELSE stl_away END) AS total_steals FROM game WHERE (team_name_home = 'Miami Heat' AND team_name_away = 'Boston Celtics') OR (team_name_home = 'Boston Celtics' AND team_name_away = 'Miami Heat'); 1253 True
What is the total number of losses Nick Kyrgios has at the Roland Garros? SELECT COUNT(*) FROM matches WHERE loser_name = 'Nick Kyrgios' AND tourney_name = 'Roland Garros'; 5 False
Which team had the highest average free throw percentage at home in the 2016 season? SELECT team_name_home, AVG(ft_pct_home) AS avg_ft_percentage FROM game WHERE season_id = '22016' GROUP BY team_name_home ORDER BY avg_ft_percentage DESC LIMIT 1; Boston Celtics | 0.820975609756098 True
What is the average fast break points scored by the Philadelphia 76ers at home during the 2018 season? SELECT AVG(os.pts_fb_home) AS avg_fast_break FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_abbreviation_home = 'PHI' AND g.season_id = '22018'; 16.32352941 True
How many total points did the Chicago Bulls score across all games in the 1988 season? SELECT SUM(pts) AS total_points FROM ( SELECT pts_home AS pts FROM game WHERE team_abbreviation_home = 'CHI' AND season_id = '21988' UNION ALL SELECT pts_away AS pts FROM game WHERE team_abbreviation_away = 'CHI' AND season_id = '21988' ); 8726.0 True
In which season did the Milwaukee Bucks have the highest average fg_pct at home? SELECT season_id, AVG(fg_pct_home) as avg_stat FROM game WHERE team_name_home = 'Milwaukee Bucks' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 42017.0 True
What is the shortest player's height? SELECT MIN(height) FROM players WHERE height IS NOT NULL; 145.0 False
How many matches has 'Rafael Nadal' lost? SELECT count(*) FROM matches WHERE loser_name = 'Rafael Nadal'; 255 False
How many matches went to “best of 5” at the US Open? SELECT COUNT(*) FROM matches WHERE tourney_name = 'US Open' AND best_of = '5'; 14144 False
Find all players born after January 1, 2008. SELECT name, dob FROM players WHERE dob > 20080000; Vito Antonio Darderi|20080113.0 False
What is the number of wins Rafael Nadal has at the Australian Open? SELECT COUNT(*) FROM matches WHERE winner_name = 'Rafael Nadal' AND tourney_name = 'Australian Open'; 77 False
What is the total number of losses Taylor Fritz has at the Roland Garros? SELECT COUNT(*) FROM matches WHERE loser_name = 'Taylor Fritz' AND tourney_name = 'Roland Garros'; 7 False
What is the state of the team nicknamed 'Jazz'? SELECT state FROM team WHERE nickname = 'Jazz'; Utah True
How many games did the Sacramento Kings lose at home in 1996? SELECT COUNT(*) as home_losses FROM game WHERE team_name_home = 'Sacramento Kings' AND wl_home = 'L' AND season_id = '21996'; 19.0 True
Who won the longest match recorded in the 2021 season? SELECT winner_name FROM matches WHERE tourney_date BETWEEN 20210000 AND 20211231 ORDER BY minutes DESC LIMIT 1; Jozef Kovalik False
How many fastbreak points did the Los Angeles Clippers average in home games during the 2020 season? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'LA Clippers' AND g.season_id = '22020'; 11.5 True
How many games did the Cleveland Cavaliers play at home with more than 8 times tied in 1996? SELECT COUNT(*) as games FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Cleveland Cavaliers' AND os.times_tied > 8 AND g.season_id = '21996'; 5.0 True
Which team had the highest average points from second chance opportunities in home games they won during the 2016 season? SELECT g.team_name_home, AVG(o.pts_2nd_chance_home) AS avg_second_chance_pts FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.wl_home = 'W' AND g.season_id = '22016' GROUP BY g.team_name_home ORDER BY avg_second_chance_pts DESC LIMIT 1; Los Angeles Lakers | 15.6153846153846 True
Which team had the most games where both teams scored over 110 points? SELECT team FROM (SELECT team_abbreviation_home AS team FROM game WHERE pts_home > 110 AND pts_away > 110 UNION ALL SELECT team_abbreviation_away FROM game WHERE pts_home > 110 AND pts_away > 110) GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; LAL True
Get the total points for all ranked players by country (only the top 10) SELECT p.ioc, SUM(r.Points) as total_points FROM rankings r JOIN players p ON r.player = p.player_id WHERE r.ranking_date = (SELECT MAX(ranking_date) FROM rankings) GROUP BY p.ioc ORDER BY total_points DESC LIMIT 10; USA|26319.0 ITA|24835.0 FRA|24732.0 RUS|17876.0 ESP|17474.0 ARG|16757.0 AUS|14319.0 GER|14093.0 SRB|13632.0 GBR|8007.0 False
How many players have 'Tennis' in their name? SELECT COUNT(*) FROM players WHERE name LIKE '%Tennis%'; 0 False
When was the last time the New York Knicks won a home game? SELECT game_date FROM game WHERE team_abbreviation_home = 'NYK' AND wl_home = 'W' ORDER BY game_date DESC LIMIT 1; 2023-05-10 00:00:00 True
What is the total number of fast break points scored by the Memphis Grizzlies at home during the 2005 season? SELECT SUM(pts_fb_home) FROM other_stats WHERE game_id IN ( SELECT game_id FROM game WHERE team_name_home = 'Memphis Grizzlies' AND season_id = '22005' ); 368 True
How many times did matches result in a retirement? SELECT COUNT(*) FROM matches WHERE score LIKE '%RET%'; 27840 False
What is the average number of assists per game for the Golden State Warriors when they won during the 2018 season? SELECT AVG(assists) AS avg_assists FROM ( SELECT ast_home AS assists FROM game WHERE team_name_home = 'Golden State Warriors' AND wl_home = 'W' AND season_id = '22018' UNION ALL SELECT ast_away AS assists FROM game WHERE team_name_away = 'Golden State Warriors' AND wl_away = 'W' AND season_id = '22018' ) AS winning_games 31 True
How many games did the Golden State Warriors lose away in 1996? SELECT COUNT(*) as away_losses FROM game WHERE team_name_away = 'Golden State Warriors' AND wl_away = 'L' AND season_id = '21996'; 29.0 True
What is the total points in the paint by the Chicago Bulls at home in games they lost in 1996? SELECT SUM(os.pts_paint_home) as total_pts_paint FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Chicago Bulls' AND g.wl_home = 'L' AND g.season_id = '21996'; 56.0 True
When was the Los Angeles Clippers team founded according to the team database? SELECT year_founded FROM team WHERE full_name = 'Los Angeles Clippers'; 1970 True
What is the average age of winners of the 'Australian Open'? SELECT avg(winner_age) FROM matches WHERE tourney_name = 'Australian Open'; 25.6905314807382 False
Which team is located in the state of Indiana? SELECT full_name FROM team WHERE state = 'Indiana'; Indiana Pacers True
In how many different tournaments did Pete Sampras play? SELECT COUNT(DISTINCT tourney_name) FROM matches WHERE winner_name = 'Pete Sampras' OR loser_name = 'Pete Sampras'; 82 False
What is the name and country of the player who lost the longest match (by minutes)? SELECT T1.name, T1.ioc FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.minutes DESC LIMIT 1; Tomas Lipovsek Puches|ARG False
How many home games did the Orlando Magic play in the 2013 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Orlando Magic' AND season_id = '22013'; 41.0 True
What was the average number of fastbreak points scored by the Houston Rockets in games they won by more than 15 points at home? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Houston Rockets' AND g.wl_home = 'W' AND (g.pts_home - g.pts_away) > 15; 13.39790576 True
What is the highest combined ft_pct in any game involving the Los Angeles Lakers? SELECT MAX(ft_pct_home + ft_pct_away) FROM game WHERE team_name_home = 'Los Angeles Lakers' OR team_name_away = 'Los Angeles Lakers'; 1.957 True
What is the total number of points scored by the Los Angeles Clippers in the 2014 season in games where they had more team turnovers but fewer total turnovers than their opponent? SELECT SUM(g.pts_home) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'LAC' AND o.team_turnovers_home > o.team_turnovers_away AND o.total_turnovers_home < o.total_turnovers_away AND g.season_id = '22014'; 295.0 True
Which away team scored the most points off turnovers in a single game? SELECT team_abbreviation_away FROM other_stats ORDER BY pts_off_to_away DESC LIMIT 1; ATL True
What is the total number of rebounds by the San Antonio Spurs in home games during the 2015 season? SELECT SUM(reb_home) FROM game WHERE team_abbreviation_home = 'SAS' AND season_id = '22015'; 1845.0 True
What was Roger Federer’s average age when winning matches at Wimbledon? SELECT AVG(winner_age) FROM matches WHERE tourney_name = 'Wimbledon' AND winner_name = 'Roger Federer'; 29.3160377358491 False
How many matches were won by players under 25? SELECT COUNT(*) FROM matches WHERE winner_age < 25; 573136 False
How many points did the Phoenix Suns score in the highest scoring away game they played? SELECT MAX(pts_away) FROM game WHERE team_abbreviation_away = 'PHX'; 161.0 True
What is the average loser age in Wimbledon finals (best of 5)? SELECT AVG(loser_age) FROM matches WHERE tourney_name = 'Wimbledon' AND best_of = '5'; 26.8972819437329 False
What was the total score of the only game in which the home team made exactly 33 field goals? SELECT pts_home + pts_away FROM game WHERE fgm_home = 33 LIMIT 1; 144.0 True
What is the maximum number of minutes John McEnroe played at Wimbledon? SELECT MAX(minutes) FROM matches WHERE (winner_name = 'John McEnroe' OR loser_name = 'John McEnroe') AND tourney_name = 'Wimbledon'; 249.0 False
What is the average number of pts in away games by the Miami Heat? SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Miami Heat'; 96.7824377457405 True
What is the largest margin of victory in a game, whether home or away? SELECT game_date, ABS(pts_home - pts_away) AS margin FROM game ORDER BY margin DESC LIMIT 1; 2021-12-02 00:00:00|73.0 True
How many matches has Carlos Alcaraz won at Wimbledon? SELECT COUNT(*) FROM matches WHERE winner_name = 'Carlos Alcaraz' AND tourney_name = 'Wimbledon'; 11 False
How many players are taller than the average height? SELECT COUNT(*) FROM players WHERE height > (SELECT AVG(height) FROM players); 1366 False
How many matches did Italy (ITA) win against Spain (ESP) in 2023? SELECT COUNT(*) FROM matches WHERE winner_ioc = 'ITA' AND loser_ioc = 'ESP' AND tourney_date BETWEEN 20230000 AND 20231231; 117 False
What is the highest points scored by the Miami Heat at home when they had more than 10 second chance points? SELECT MAX(g.pts_home) as max_points FROM game g JOIN other_stats os ON g.game_id = os.game_id WHERE g.team_name_home = 'Miami Heat' AND os.pts_2nd_chance_home > 10; 149.0 True
What is the highest fast break points by the Houston Rockets at home? SELECT MAX(pts_fb_home) as max_fb_points FROM other_stats WHERE team_abbreviation_home = 'HOU'; 37.0 True
What is the average number of pts in away games by the Portland Trail Blazers? SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Portland Trail Blazers'; 102.6668215613383 True
What is Andre Agassi’s dominant playing hand? SELECT hand FROM players WHERE name = 'Andre Agassi'; R False
What was the total number of points in the game where both teams had the exact same number of personal fouls? SELECT pts_home + pts_away FROM game WHERE pf_home = pf_away ORDER BY game_date DESC LIMIT 1; 258.0 True
What is the total points in the paint by the Milwaukee Bucks away? SELECT SUM(pts_paint_away) as total_pts_paint FROM other_stats WHERE team_abbreviation_away = 'MIL'; 39056.0 True
What is the average points in the paint by the Utah Jazz away when they won? SELECT AVG(os.pts_paint_away) as avg_pts_paint FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Utah Jazz' AND g.wl_away = 'W'; 42.48 True
What is the average number of fg_pct in away games by the Los Angeles Lakers? SELECT AVG(fg_pct_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 0.4678996728462382 True
Which player defeated Andre Agassi the most at the US Open? SELECT winner_name, COUNT(*) AS wins FROM matches WHERE loser_name = 'Andre Agassi' AND tourney_name = 'US Open' GROUP BY winner_name ORDER BY wins DESC LIMIT 1; Pete Sampras|4 False
How many three-pointers did the Golden State Warriors make in total during the 2016 season? SELECT SUM(fg3m_home + fg3m_away) AS total_three_pointers FROM game WHERE season_id = '22016' AND (team_name_home = 'Golden State Warriors' OR team_name_away = 'Golden State Warriors'); 1719.0 True
What is the full name of the team based in Dallas? SELECT full_name FROM team WHERE city = 'Dallas'; Dallas Mavericks True
Find the average points for Pete Sampras across all rankings. SELECT AVG(Points) FROM rankings r JOIN players p ON r.player = p.player_id WHERE p.name = 'Pete Sampras'; False
How many players have the same birthday as Rafael Nadal? SELECT COUNT(*) FROM players WHERE dob = (SELECT dob FROM players WHERE name = 'Rafael Nadal') AND name != 'Rafael Nadal'; 4 False
How many times has Carlos Alcaraz defeated Novak Djokovic? SELECT COUNT(*) FROM matches WHERE winner_name = 'Carlos Alcaraz' AND loser_name = 'Novak Djokovic'; 2 False
How many games did the Los Angeles Lakers play away in 1996? SELECT COUNT(*) as away_games FROM game WHERE team_name_away = 'Los Angeles Lakers' AND season_id = '21996'; 41.0 True
Which game had the highest total points scored by both teams when the Los Angeles Lakers played at home? SELECT game_id, (pts_home + pts_away) AS total_points FROM game WHERE team_abbreviation_home = 'LAL' ORDER BY total_points DESC LIMIT 1; (0028000933, 294.0) True
What was the highest number of steals by the Detroit Pistons in a single game during the 2004 season? SELECT MAX(stl) AS max_steals FROM ( SELECT stl_home AS stl FROM game WHERE team_abbreviation_home = 'DET' AND season_id = '22004' UNION ALL SELECT stl_away AS stl FROM game WHERE team_abbreviation_away = 'DET' AND season_id = '22004' ); 13 True
What is the average age of Alexander Zverev when losing matches? SELECT AVG(loser_age) FROM matches WHERE loser_name = 'Alexander Zverev'; 20.9510638297872 False
What was the lowest-scoring game involving the Indiana Pacers in the 1994 season? SELECT MIN(total_points) AS lowest_scoring_game FROM ( SELECT (pts_home + pts_away) AS total_points FROM game WHERE season_id = '21994' AND (team_abbreviation_home = 'IND' OR team_abbreviation_away = 'IND') ); 155.0 True
What is the shortest match played by Novak Djokovic? SELECT MIN(minutes) FROM matches WHERE winner_name = 'Novak Djokovic' OR loser_name = 'Novak Djokovic'; 0.0 False
What is the date of birth of Andy Murray? SELECT dob FROM players WHERE name = 'Andy Murray'; 19870515 False
What is the average number of tov in away games by the Los Angeles Lakers? SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 14.554896142433234 True
What is the average number of points in the paint allowed by the Philadelphia 76ers when playing at home in the 2020 season in games with more than 15 lead changes? SELECT AVG(o.pts_paint_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'PHI' AND g.season_id = '22020' AND o.lead_changes > 15; 50.0 True
What was the highest total rebound count by an away team in a game? SELECT team_abbreviation_away, reb_away, game_date FROM game ORDER BY reb_away DESC LIMIT 1; BOS|90.0|1957-10-22 00:00:00 True
What is the highest three-point percentage the Phoenix Suns achieved in an away game? SELECT MAX(fg3_pct_away) FROM game WHERE team_abbreviation_away = 'PHX'; 1 True
What is the most three-pointers the Brooklyn Nets have ever made in a home game? SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Brooklyn Nets'; 22.0 True
How many matches has Alexander Zverev won against top 10 opponents? SELECT COUNT(*) FROM matches m JOIN rankings r ON m.loser_id = r.player AND m.tourney_date = r.ranking_date WHERE m.winner_name = 'Alexander Zverev' AND r.rank <= 10; 47 False
What's the average points in the paint for the Boston Celtics in home games where they won by at least 10 points? SELECT AVG(os.pts_paint_home) FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_home = 'Boston Celtics' AND g.plus_minus_home >= 10; 41.85 True
How many unique tournaments were held in the year 2019? SELECT COUNT(DISTINCT tourney_name) FROM matches WHERE tourney_date BETWEEN 20190000 AND 20191231; 591 False
How many games did the Chicago Bulls win at home in the 2010 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'CHI' AND wl_home = 'W' AND season_id = '22010'; 36 True
What was the average margin of victory for the Miami Heat during the 2013 NBA season? SELECT AVG(victory_margin) AS avg_victory_margin FROM ( SELECT plus_minus_home AS victory_margin FROM game WHERE team_name_home = 'Miami Heat' AND wl_home = 'W' AND season_id = '22013' UNION ALL SELECT plus_minus_away AS victory_margin FROM game WHERE team_name_away = 'Miami Heat' AND wl_away = 'W' AND season_id = '22013' ) AS victories 11.48148148 True
How many matches did Pete Sampras play at Wimbledon? SELECT COUNT(*) FROM matches WHERE tourney_name = 'Wimbledon' AND (winner_name = 'Pete Sampras' OR loser_name = 'Pete Sampras'); 70 False
What is the highest plus-minus score for the Indiana Pacers at home? SELECT MAX(plus_minus_home) as max_plus_minus FROM game WHERE team_name_home = 'Indiana Pacers'; 65.0 True
List all games where the Houston Rockets and Dallas Mavericks played each other in the 2015 season. SELECT * FROM game WHERE season_id = '22015' AND ((team_abbreviation_home = 'HOU' AND team_abbreviation_away = 'DAL') OR (team_abbreviation_home = 'DAL' AND team_abbreviation_away = 'HOU')); 22015|1610612745|HOU|Houston Rockets|0021500140|2015-11-14 00:00:00|HOU vs. DAL|L|240|32.0|84.0|0.381|9.0|34.0|0.265|25.0|32.0|0.781|12.0|31.0|43.0|22.0|9.0|5.0|14.0|23.0|98.0|-12|1|1610612742|DAL|Dallas Mavericks|DAL @ HOU|W|43.0|89.0|0.483|8.0|28.0|0.286|16.0|21.0|0.762|8.0|37.0|45.0|24.0|6.0|7.0|11.0|21.0|110.0|12|1|Regular Season 22015|1610612742|DAL|Dallas Mavericks|0021500287|2015-12-04 00:00:00|DAL vs. HOU|L|240|37.0|81.0|0.457|8.0|29.0|0.276|14.0|20.0|0.7|11.0|31.0|42.0|23.0|8.0|5.0|18.0|17.0|96.0|-4|1|1610612745|HOU|Houston Rockets|HOU @ DAL|W|39.0|84.0|0.464|12.0|26.0|0.462|10.0|18.0|0.556|15.0|30.0|45.0|20.0|12.0|5.0|18.0|22.0|100.0|4|1|Regular Season 22015|1610612745|HOU|Houston Rockets|0021500665|2016-01-24 00:00:00|HOU vs. DAL|W|240|43.0|89.0|0.483|15.0|44.0|0.341|14.0|21.0|0.667|9.0|31.0|40.0|27.0|9.0|7.0|9.0|21.0|115.0|11|1|1610612742|DAL|Dallas Mavericks|DAL @ HOU|L|36.0|79.0|0.456|15.0|30.0|0.5|17.0|22.0|0.773|8.0|28.0|36.0|17.0|4.0|4.0|16.0|20.0|104.0|-11|1|Regular Season 22015|1610612742|DAL|Dallas Mavericks|0021501170|2016-04-06 00:00:00|DAL vs. HOU|W|240|33.0|80.0|0.413|10.0|33.0|0.303|12.0|14.0|0.857|13.0|27.0|40.0|19.0|9.0|4.0|14.0|20.0|88.0|2|1|1610612745|HOU|Houston Rockets|HOU @ DAL|L|34.0|78.0|0.436|6.0|20.0|0.3|12.0|18.0|0.667|12.0|29.0|41.0|19.0|6.0|4.0|16.0|17.0|86.0|-2|1|Regular Season True
What is the average number of three-pointers made by the Golden State Warriors at home in the 2018 season? SELECT AVG(fg3m_home) FROM game WHERE team_abbreviation_home = 'GSW' AND season_id = '22018'; 13.1951219512195 True
Find players who have improved their ranking by more than 2000 spots SELECT p.name, MAX(r.rank) as old_rank, MIN(r.rank) as new_rank, (MAX(r.rank) - MIN(r.rank)) as improvement FROM rankings r JOIN players p ON r.player = p.player_id GROUP BY p.player_id, p.name HAVING (MAX(r.rank) - MIN(r.rank)) > 2000 ORDER BY improvement DESC; Stefanos Tsitsipas|2208|3|2205 Denis Shapovalov|2151|10|2141 Ryan Peniston|2239|123|2116 Carlos Taberner|2197|85|2112 Bernabe Zapata Miralles|2139|37|2102 Alejandro Tabilo|2095|24|2071 Tomas Barrios Vera|2163|93|2070 Gian Marco Moroni|2221|159|2062 Tallon Griekspoor|2077|21|2056 Miguel Angel Lopez Jaen|2221|171|2050 Tomas Martin Etcheverry|2075|27|2048 Gijs Brouwer|2154|114|2040 Adam Chadaj|2237|202|2035 Soon Woo Kwon|2082|52|2030 Benjamin Bonzi|2070|42|2028 Andrea Pellegrino|2163|136|2027 Martin Verkerk|2035|14|2021 Marc Andrea Huesler|2060|47|2013 Thai Son Kwiatkowski|2189|181|2008 Lukas Klein|2122|116|2006 Altug Celikbilek|2159|154|2005 Ivan Gakhov|2143|142|2001 Jay Clarke|2154|153|2001 False
How many games did the Oklahoma City Thunder score more than 30 points in the first quarter during the 2017 season? SELECT COUNT(*) AS high_scoring_first_quarters FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE (g.team_name_home = 'Oklahoma City Thunder' AND g.pts_home / 4 > 30) OR (g.team_name_away = 'Oklahoma City Thunder' AND g.pts_away / 4 > 30) AND g.season_id = '22017'; 83 True
Show countries with more than 1000 players SELECT ioc, COUNT(*) as player_count FROM players GROUP BY ioc HAVING COUNT(*) > 1000 ORDER BY player_count DESC; USA|13102 AUS|3266 GBR|3200 ESP|3026 GER|2675 ITA|2656 FRA|2582 BRA|2092 ARG|1759 MEX|1323 JPN|1305 RUS|1093 IND|1078 RSA|1040 False
What is the highest number of points the Golden State Warriors have ever scored in a single home game? SELECT MAX(pts_home) FROM game WHERE team_abbreviation_home = 'GSW'; 149.0 True
How many right handed players are there? SELECT COUNT(*) FROM players WHERE hand = 'R'; 15666 False
What was the difference in second-chance points between the Chicago Bulls and their opponents in their closest home game of the 2016 season? SELECT o.pts_2nd_chance_home - o.pts_2nd_chance_away AS second_chance_diff FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Chicago Bulls' AND g.season_id = '22016' ORDER BY ABS(g.pts_home - g.pts_away) ASC LIMIT 1; -5 True
"What is the total second chance points by the Miami Heat at home?""" SELECT SUM(pts_2nd_chance_home) as total_2nd_chance FROM other_stats WHERE team_abbreviation_home = 'MIA'; 11670.0 True
How many points did the home team score in the game with the most second chance points? SELECT pts_home FROM game WHERE game_id = (SELECT game_id FROM other_stats ORDER BY (pts_2nd_chance_home + pts_2nd_chance_away) DESC LIMIT 1); 115.0 True
How many times has Pete Sampras been ranked in the top 5? SELECT COUNT(*) AS top5_count FROM rankings r JOIN players p ON r.player = p.player_id WHERE p.name = 'Pete Sampras' AND r.rank <= 5; 509 False
List the names of players who have been ranked #1 for at least one week in 2023. SELECT DISTINCT p.name FROM rankings r JOIN players p ON r.player = p.player_id WHERE r.rank = 1 AND r.ranking_date BETWEEN 20230000 AND 20231231; Carlos Alcaraz Novak Djokovic False
How many total turnovers did the Sacramento Kings commit in the 2001 season? SELECT SUM(tov) AS total_turnovers FROM ( SELECT tov_home AS tov FROM game WHERE team_abbreviation_home = 'SAC' AND season_id = '22001' UNION ALL SELECT tov_away AS tov FROM game WHERE team_abbreviation_away = 'SAC' AND season_id = '22001' ); 1128.0 True
Which team founded in the 70s has a nickname starting with 'C'? SELECT full_name FROM team WHERE year_founded BETWEEN 1970 AND 1979 AND nickname LIKE 'C%'; Cleveland Cavaliers, Los Angeles Clippers True
What is the average height of winners in the Wimbledon final over all years? SELECT AVG(winner_ht) FROM matches WHERE tourney_name = 'Wimbledon' AND round = 'F'; 184.229508196721 False
In which season did the Boston Celtics have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 1958.0 True
What is the name of the player who was ranked #1 on 2023-06-12? SELECT T1.name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player WHERE T2.rank = 1 AND T2.ranking_date = 20230612; Novak Djokovic False
What is the highest combined score in a game between the Golden State Warriors and the Cleveland Cavaliers? SELECT MAX(pts_home + pts_away) FROM game WHERE (team_name_home = 'Golden State Warriors' AND team_name_away = 'Cleveland Cavaliers') OR (team_name_home = 'Cleveland Cavaliers' AND team_name_away = 'Golden State Warriors'); 266.0 True
What is the average scoring ouput for home teams. Round to 2 decimal places. SELECT ROUND(AVG(pts_home),2) AS avg_home_points FROM game WHERE season_type = 'Regular Season'; 104.76 True
Which team had the most fast break points in a single home game during the 2020 season? SELECT team_name_home, MAX(pts_fb_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE game.season_id = '22020'; Houston Rockets|35 True
What is the highest number of points the Los Angeles Lakers have scored in a single away game? SELECT MAX(pts_away) FROM game WHERE team_abbreviation_away = 'LAL'; 153.0 True
How many ranking entries exist for player 104925? SELECT count(*) FROM rankings WHERE player = 104925; 988 False
In which season did the Miami Heat have the highest average ast at home? SELECT season_id, AVG(ast_home) as avg_stat FROM game WHERE team_name_home = 'Miami Heat' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2019.0 True
What is the Chicago Bulls' largest lead in a home game during the 2016 season? SELECT MAX(plus_minus_home) FROM game WHERE team_abbreviation_home = 'CHI' AND season_id = '22016'; 47 True
Which country has the tallest average players? SELECT ioc, AVG(height) AS avg_height FROM players GROUP BY ioc ORDER BY avg_height DESC LIMIT 1; YUG|194.0 False
How many points did the away team score when the home team had more than 20 offensive rebounds? SELECT SUM(pts_away) FROM game WHERE game_id IN (SELECT game_id FROM game WHERE oreb_home > 20); 199836.0 True
Which team played the most total games (home + away) between 1995 and 2005? SELECT team FROM (SELECT team_abbreviation_home AS team FROM game WHERE season_id BETWEEN '21995' AND '22005' UNION ALL SELECT team_abbreviation_away FROM game WHERE season_id BETWEEN '21995' AND '22005') GROUP BY team ORDER BY COUNT(*) DESC LIMIT 1; WAS True
In the 2001 season, what was the average number of second chance points scored by the opponents when the Atlanta Hawks played at home and lost? SELECT AVG(o.pts_2nd_chance_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_home = 'ATL' AND g.wl_home = 'L' AND g.season_id = '22001'; 13.333333333333334 True
How many games did the Cleveland Cavaliers lose away with more than 10 fast break points in 1996? SELECT COUNT(*) as losses FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Cleveland Cavaliers' AND g.wl_away = 'L' AND os.pts_fb_away > 10 AND g.season_id = '21996'; 4.0 True
What is the highest combined ast in any game involving the Orlando Magic? SELECT MAX(ast_home + ast_away) FROM game WHERE team_name_home = 'Orlando Magic' OR team_name_away = 'Orlando Magic'; 74.0 True
What is the win percentage of left-handed vs right-handed players? SELECT winner_hand, COUNT(*) as wins, ROUND(COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (), 2) as win_percentage FROM matches WHERE winner_hand IN ('L', 'R') GROUP BY winner_hand; L|100862|12.85 R|683813|87.15 False
What is the average age of losers? SELECT avg(loser_age) FROM matches; 23.6776674381365 False
In which season did the Charlotte Hornets have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Charlotte Hornets' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2017.0 True
In the 2020 season, what was the average number of second chance points allowed by the New Orleans Pelicans in games they won by less than 5 points? SELECT AVG(o.pts_2nd_chance_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE ((g.team_abbreviation_home = 'NOP' AND g.wl_home = 'W' AND ABS(g.pts_home - g.pts_away) < 5) OR (g.team_abbreviation_away = 'NOP' AND g.wl_away = 'W' AND ABS(g.pts_home - g.pts_away) < 5)) AND g.season_id = '22020'; 16.6 True
Which home team had the most games with a positive plus-minus but still lost? SELECT team_name_home FROM game WHERE wl_home = 'L' AND plus_minus_home > 0 GROUP BY team_name_home ORDER BY COUNT(*) DESC LIMIT 1; West NBA All Stars West True
Find the country with the highest average player height. SELECT ioc FROM players GROUP BY ioc HAVING COUNT(*) > 5 ORDER BY AVG(height) DESC LIMIT 1; YUG False
What is the average number of ft_pct in home games by the Charlotte Hornets? SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Charlotte Hornets'; 0.7601475237091683 True
Count the number of matches where both players were from the same country at the US Open. SELECT COUNT(*) FROM matches WHERE tourney_name = 'US Open' AND winner_ioc = loser_ioc; 6604 False
List all matches in 2023 where the winner was from 'ECU' and the match lasted more than 3 hours (180 mins). SELECT tourney_name, winner_name, loser_name FROM matches WHERE winner_ioc = 'ECU' AND minutes > 180 AND tourney_date >= 20230000 AND tourney_date < 20240000; Lima CH|Alvaro Guillen Meza|Ignacio Buse Montevideo CH|Alvaro Guillen Meza|Luciano Darderi Montevideo CH|Alvaro Guillen Meza|Renzo Olivo False
How many matches were played in each best-of format? SELECT best_of, COUNT(*) as match_count FROM matches WHERE LENGTH(best_of) = 1 GROUP BY best_of; 1|36 3|853783 5|67502 F|653 False
How many times did the Miami Heat score more than 120 points at home in the 2015 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'MIA' AND season_id = '22015' AND pts_home > 120; 3 True
What is the total number of wins Pete Sampras has at the US Open? SELECT COUNT(*) FROM matches WHERE winner_name = 'Pete Sampras' AND tourney_name = 'US Open'; 71 False
What is the largest margin of victory the Miami Heat have ever had in an away game? SELECT MAX(ABS(pts_away - pts_home)) AS largest_margin FROM game WHERE team_abbreviation_away = 'MIA' AND pts_away > pts_home; 34.0 True
What is the average height of all players? SELECT AVG(height) FROM players; 183.74813763746 False
How many matches did Novak Djokovic win at the Rolland Garros? SELECT COUNT(*) FROM matches WHERE winner_name = 'Novak Djokovic' AND tourney_name = 'Roland Garros'; 96 False
How many total offensive rebounds did the Houston Rockets have in away games during the 2018 season? SELECT SUM(oreb_away) FROM game WHERE team_name_away = 'Houston Rockets' AND season_id = '22018'; 419.0 True
What is the minimum age Rafael Nadal lost a match? SELECT MIN(loser_age) FROM matches WHERE loser_name = 'Rafael Nadal'; 15.2 False
What is the most common country ('ioc') for players? SELECT ioc FROM players GROUP BY ioc ORDER BY count(*) DESC LIMIT 1; USA False
List the total points for Carlos Alcaraz on the last recorded ranking date. SELECT Points FROM rankings WHERE player = (SELECT player_id FROM players WHERE name = 'Carlos Alcaraz') ORDER BY ranking_date DESC LIMIT 1; 7300.0 False
What is the highest rank achieved by Jannik Sinner in 2023? SELECT MIN(rank) FROM rankings r JOIN players p ON r.player = p.player_id WHERE p.name = 'Jannik Sinner' AND r.ranking_date BETWEEN 20230000 AND 20231231; 4 False
How many free throws did the Houston Rockets attempt in away games they won during the 2020 season? SELECT SUM(fta_away) FROM game WHERE team_name_away = 'Houston Rockets' AND wl_away = 'W' AND season_id = '22020'; 149.0 True
How many left-handed players are ranked in the top 50 on 2016-07-25? SELECT COUNT(DISTINCT p.player_id) FROM players p JOIN rankings r ON p.player_id = r.player WHERE p.hand = 'L' AND r.rank <= 50 AND r.ranking_date = 20160725; 9 False
What is the maximum number of minutes played in a single match? SELECT MAX(minutes) FROM matches; 4756.0 False
What was the average number of offensive rebounds per game for the Chicago Bulls in the 2019 season? SELECT AVG(oreb) AS avg_offensive_rebounds FROM ( SELECT game_id, oreb_home AS oreb FROM game WHERE team_name_home = 'Chicago Bulls' AND season_id = '22019' UNION ALL SELECT game_id, oreb_away AS oreb FROM game WHERE team_name_away = 'Chicago Bulls' AND season_id = '22019' ); 10.46153846 True
How many games did the Boston Celtics win on the road during the 2018 season? SELECT COUNT(*) AS away_wins FROM game WHERE team_name_away = 'Boston Celtics' AND wl_away = 'W' AND season_id = '22018'; 21 True
What is the lowest number of points the Golden State Warriors have scored in an away game? SELECT MIN(pts_away) FROM game WHERE team_abbreviation_away = 'GSW'; 65.0 True
What was the difference in average free throw attempts between the Brooklyn Nets and their opponents in home games during the 2020 season? SELECT AVG(fta_home - fta_away) AS fta_diff FROM game WHERE team_name_home = 'Brooklyn Nets' AND season_id = '22020'; 1.083333333 True
In which season did the Boston Celtics have the highest average tov at home? SELECT season_id, AVG(tov_home) as avg_stat FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2005.0 True
How many team turnovers did the New York Knicks have at home? SELECT SUM(team_turnovers_home) as total_team_turnovers FROM other_stats WHERE team_abbreviation_home = 'NYK'; 550.0 True
How many games did the Milwaukee Bucks play at home during the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Milwaukee Bucks' AND season_id = '22020'; 36 True
What percentage of matches are won by the taller player? SELECT (CAST(SUM(CASE WHEN winner_ht > loser_ht THEN 1 ELSE 0 END) AS FLOAT) / COUNT(*)) * 100 as percentage FROM matches WHERE winner_ht IS NOT NULL AND loser_ht IS NOT NULL; 45.2674228807518 False
Who was the number 1 ranked player on March 20, 2023? SELECT p.name FROM players AS p JOIN rankings AS r ON p.player_id = r.player WHERE r.rank = 1 AND r.ranking_date = 20230320; Carlos Alcaraz False
What is the maximum height of any opponent Jannik Sinner has beaten? SELECT MAX(loser_ht) FROM matches WHERE winner_name = 'Jannik Sinner'; 211.0 False
What is the total number of points scored by the Milwaukee Bucks away when they had more than 5 lead changes? SELECT SUM(g.pts_away) as total_points FROM game g JOIN other_stats os ON g.game_id = os.game_id WHERE g.team_name_away = 'Milwaukee Bucks' AND os.lead_changes > 5; 44835.0 True
Find the name and height of the player with ID 104745. SELECT name, height FROM players WHERE player_id = 104745; Rafael Nadal|185.0 False
How many matches were won by a player who was ranked number 1 at the time of the match? SELECT count(*) FROM matches AS T1 JOIN rankings AS T2 ON T1.winner_id = T2.player AND T1.tourney_date = T2.ranking_date WHERE T2.rank = 1; 2369 False
Find the tournament with the fewest matches overall. SELECT tourney_name, COUNT(*) AS match_count FROM matches GROUP BY tourney_name ORDER BY match_count ASC LIMIT 1; Cannes Chps|1 False
What is the highest combined ast in any game involving the Boston Celtics? SELECT MAX(ast_home + ast_away) FROM game WHERE team_name_home = 'Boston Celtics' OR team_name_away = 'Boston Celtics'; 79.0 True
How many matches has each player won? Show the top 10. SELECT winner_name, count(*) FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 10; Roger Federer|1305 Jimmy Connors|1279 Novak Djokovic|1179 Rafael Nadal|1167 Ivan Lendl|1075 Guillermo Vilas|953 Ilie Nastase|950 Andre Agassi|887 John McEnroe|886 False
Which player had the most match wins? SELECT winner_name, COUNT(*) AS wins FROM matches GROUP BY winner_name ORDER BY wins DESC LIMIT 1; |26399 False
What is the average age difference between winners and losers? SELECT AVG(winner_age - loser_age) FROM matches WHERE winner_age IS NOT NULL AND loser_age IS NOT NULL; 0.35414132842825 False
What is the highest number of three-pointers made in a single game by the Houston Rockets at home? SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Houston Rockets'; 27.0 True
Which player has defeated Rafael Nadal the most? SELECT winner_name, COUNT(*) AS wins_against FROM matches WHERE loser_name = 'Rafael Nadal' GROUP BY winner_name ORDER BY wins_against DESC LIMIT 1; Novak Djokovic|30 False
What was the average points scored by the Denver Nuggets in home games during the 2019 season? SELECT AVG(pts_home) AS avg_home_points FROM game WHERE team_name_home = 'Denver Nuggets' AND season_id = '22019'; 111.8378378 True
What is the average rank of winners in the Roland Garros tournament? SELECT AVG(r.rank) FROM matches m JOIN rankings r ON m.winner_id = r.player AND m.tourney_date = r.ranking_date WHERE m.tourney_name = 'Roland Garros'; 91.8841528594335 False
How many players from France are in the database? SELECT COUNT(*) FROM players WHERE ioc = 'FRA'; 2582 False
Which team had the best three-point shooting percentage in home games during the 2020 season? SELECT team_name_home, AVG(fg3_pct_home) AS avg_3pt_pct FROM game WHERE season_id = '22020' GROUP BY team_name_home ORDER BY avg_3pt_pct DESC LIMIT 1; LA Clippers | 0.423777777777778 True
What is the highest number of rebounds recorded by a home team in a game during the 2005 season? SELECT MAX(reb_home) FROM game WHERE season_id = '22005'; 65.0 True
What was the average margin of victory for the Boston Celtics in home games during the 2000 season? SELECT AVG(pts_home - pts_away) AS avg_victory_margin FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22000'; 9.75 True
What is the total second chance points by the Washington Wizards away? SELECT SUM(pts_2nd_chance_away) as total_2nd_chance FROM other_stats WHERE team_abbreviation_away = 'WAS'; 13226.0 True
Which team had the worst average point differential in the 2007 season? SELECT team_abbreviation, AVG(point_diff) AS avg_point_differential FROM ( SELECT team_abbreviation_home AS team_abbreviation, (pts_home - pts_away) AS point_diff FROM game WHERE season_id = '22007' UNION ALL SELECT team_abbreviation_away, (pts_away - pts_home) FROM game WHERE season_id = '22007' ) GROUP BY team_abbreviation ORDER BY avg_point_differential ASC LIMIT 1; SEA|-8.75609756097561 True
What is the average number of three-pointers made by away teams in games where they had more turnovers than assists? SELECT AVG(fg3m_away) FROM game WHERE tov_away > ast_away; 4.511052937754508 True
What was the lowest number of combined turnovers in any game involving the San Antonio Spurs during the 2019 season? SELECT MIN(o.total_turnovers_home + o.total_turnovers_away) AS min_combined_turnovers FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE (g.team_name_home = 'San Antonio Spurs' OR g.team_name_away = 'San Antonio Spurs') AND g.season_id = '22019'; 13 True
How many games had at least one team with 30+ assists? SELECT COUNT(*) FROM game WHERE ast_home >= 30 OR ast_away >= 30; 11305 True
What country is Rafael Nadal from? SELECT ioc FROM players WHERE name = 'Rafael Nadal'; ESP False
What is the average second-chance points for Toronto Raptors home games between 2015-2020? SELECT AVG(os.pts_2nd_chance_home) AS avg_second_chance FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_abbreviation_home = 'TOR' AND g.season_id BETWEEN '22015' AND '22020'; 13.07653061 True
What are the nicknames of teams based in Florida? SELECT nickname FROM team WHERE state = 'Florida'; Heat, Magic True
Get the full names of all players taller than 210 cm. SELECT name FROM players WHERE height > 210; Reilly|Opelka False
How many games did the Sacramento Kings lose away with more than 15 fast break points in 1996? SELECT COUNT(*) as losses FROM other_stats os JOIN game g ON os.game_id = g.game_id WHERE g.team_name_away = 'Sacramento Kings' AND g.wl_away = 'L' AND os.pts_fb_away > 15 AND g.season_id = '21996'; 10.0 True
Show players born in the year 2008 SELECT name, dob FROM players WHERE dob >= 20080000 AND dob < 20090000; Vito Antonio Darderi|20080113.0 False
How many times did the Memphis Grizzlies lose at home in the 2008 season despite recording more steals and blocks than their opponent? SELECT COUNT(*) FROM game g WHERE g.team_abbreviation_home = 'MEM' AND g.wl_home = 'L' AND g.stl_home > g.stl_away AND g.blk_home > g.blk_away AND g.season_id = '22008'; 3 True
How many times were games tied when the Indiana Pacers played away? SELECT SUM(times_tied) as total_times_tied FROM other_stats WHERE team_abbreviation_away = 'IND'; 4910.0 True
What was the most blocks recorded by the Orlando Magic in a single home game in the 1999 season? SELECT MAX(blk_home) AS max_blocks FROM game WHERE team_abbreviation_home = 'ORL' AND season_id = '21999'; 10.0 True
What team had the most turnovers in a single game during the 2019 season? SELECT CASE WHEN tov_home > tov_away THEN team_name_home ELSE team_name_away END AS team_with_most_turnovers FROM game WHERE season_id = '22019' ORDER BY CASE WHEN tov_home > tov_away THEN tov_home ELSE tov_away END DESC LIMIT 1 Sacramento Kings True
What was the total number of points in the only game where the sum of both teams' free throws made was exactly 42? SELECT pts_home + pts_away FROM game WHERE (ftm_home + ftm_away) = 42 LIMIT 1; 156.0 True
How many games did the Boston Celtics win at home during the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22020'; 21 True
How many away games did the Chicago Bulls play in the 2020 season? SELECT COUNT(*) FROM game WHERE team_name_away = 'Chicago Bulls' AND season_id = '22020'; 36.0 True
Which team had the most away games where they had more offensive than defensive rebounds? SELECT team_abbreviation_away FROM game WHERE oreb_away > dreb_away GROUP BY team_abbreviation_away ORDER BY COUNT(*) DESC LIMIT 1; ATL True
What is the Los Angeles Lakers' largest lead in a home game during the 2016 season? SELECT MAX(plus_minus_home) FROM game WHERE team_abbreviation_home = 'LAL' AND season_id = '22016'; 27 True
Who is the youngest player currently in the top 100 (based on latest ranking date)? SELECT p.name FROM players p JOIN rankings r ON p.player_id = r.player WHERE r.ranking_date = (SELECT MAX(ranking_date) FROM rankings) AND r.rank <= 100 ORDER BY p.dob DESC LIMIT 1; Jakub Mensik False
How many home games did the Los Angeles Lakers play in the 2022 season? SELECT COUNT(*) FROM game WHERE team_name_home = 'Los Angeles Lakers' AND season_id = '22022'; 41.0 True
What was the highest combined steals and blocks total for the Toronto Raptors in any home game during their championship season? SELECT MAX(stl_home + blk_home) AS combined_steals_blocks FROM game WHERE team_name_home = 'Toronto Raptors' AND season_id = '22019'; 24 True
List the players who have beaten Novak Djokovic more than twice. SELECT winner_name FROM matches WHERE loser_name = 'Novak Djokovic' GROUP BY winner_name HAVING COUNT(*) > 2; Alexander Zverev Andy Murray Andy Roddick Daniil Medvedev David Ferrer Dominic Thiem Fernando Verdasco Jannik Sinner Jo-Wilfried Tsonga Juan Martin del Potro Mikhail Youzhny Olivier Rochus Rafael Nadal Roberto Bautista Agut Roger Federer Stan Wawrinka Tomas Berdych Tommy Haas False
List the tourney_name of all tournaments won by Andy Murray in 2016. SELECT DISTINCT tourney_name FROM matches WHERE winner_name = 'Andy Murray' AND round = 'F' AND tourney_date BETWEEN 20160000 AND 20161231; Rome Masters Queen's Club Wimbledon Rio Olympics Beijing Shanghai Masters Vienna Paris Masters Tour Finals False
What is the average height of players who defeated Roger Federer? SELECT AVG(winner_ht) FROM matches WHERE loser_name = 'Roger Federer'; 186.934482758621 False
What is the total rebounds by the Miami Heat at home? SELECT SUM(reb_home) as total_rebounds FROM game WHERE team_name_home = 'Miami Heat'; 65199.0 True
How many points were scored in the earliest recorded game in the database? SELECT (pts_home + pts_away) FROM game ORDER BY game_date ASC LIMIT 1; 134.0 True
In which season did the Chicago Bulls have the highest average ast at home? SELECT season_id, AVG(ast_home) as avg_stat FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 2021.0 True
What is the average number of fg_pct in home games by the Chicago Bulls? SELECT AVG(fg_pct_home) FROM game WHERE team_name_home = 'Chicago Bulls'; 0.4636694306246544 True
How many matches lasted more than 180 minutes? SELECT COUNT(*) FROM matches WHERE minutes > 180; 5425 False
How many matches were won by a player who lost the first set? SELECT COUNT(*) FROM matches WHERE score LIKE '0-6%' OR score LIKE '1-6%' OR score LIKE '2-6%' OR score LIKE '3-6%' OR score LIKE '4-6%' OR score LIKE '5-6%' OR score LIKE '6-7%'; 138823 False
What is the highest combined reb in any game involving the San Antonio Spurs? SELECT MAX(reb_home + reb_away) FROM game WHERE team_name_home = 'San Antonio Spurs' OR team_name_away = 'San Antonio Spurs'; 134.0 True
How many different countries are represented? SELECT COUNT(DISTINCT ioc) FROM players; 226 False
What is the highest combined total score (home + away) in a single game in the dataset? SELECT game_date, (pts_home + pts_away) AS total_points FROM game ORDER BY total_points DESC LIMIT 1; 2017-02-19 00:00:00|374.0 True
In games where the Brooklyn Nets scored more than 50 points in the paint at home, what was their assist-to-field goal made ratio? SELECT SUM(g.ast_home) * 1.0 / SUM(g.fgm_home) AS assist_to_fgm_ratio FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Brooklyn Nets' AND o.pts_paint_home > 50; 0.588761175 True
What is the average number of tov in home games by the Miami Heat? SELECT AVG(tov_home) FROM game WHERE team_name_home = 'Miami Heat'; 14.627184466019418 True
What is the average height of all US Open winners? SELECT AVG(winner_ht) FROM matches WHERE tourney_name = 'US Open'; 184.635440803266 False
What was the longest match by duration? SELECT tourney_name, winner_name, loser_name, minutes FROM matches WHERE minutes IS NOT NULL ORDER BY minutes DESC LIMIT 1; Guayaquil CH|Federico Coria|Tomas Lipovsek Puches|4756.0 False
Which team is based in the city of Chicago? SELECT full_name FROM team WHERE city = 'Chicago'; Chicago Bulls True
List all players from 'FRA' who were ranked in the top 50 on '2023-01-02'. SELECT T1.name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player WHERE T1.ioc = 'FRA' AND T2.rank <= 50 AND T2.ranking_date = 20230102; Adrian Mannarino Arthur Rinderknech False
What is the average age of match winners? SELECT AVG(winner_age) FROM matches WHERE winner_age IS NOT NULL; 24.0506641635802 False
What is the win-loss ratio for Jannik Sinner? SELECT SUM(CASE WHEN winner_name = 'Jannik Sinner' THEN 1 ELSE 0 END) * 1.0 / NULLIF(SUM(CASE WHEN loser_name = 'Jannik Sinner' THEN 1 ELSE 0 END), 0) AS win_loss_ratio FROM matches WHERE winner_name = 'Jannik Sinner' OR loser_name = 'Jannik Sinner'; 2.51304347826087 False
What is the average ranking of players defeated by Novak Djokovic? SELECT AVG(r.rank) FROM matches m JOIN rankings r ON m.loser_id = r.player WHERE m.winner_name = 'Novak Djokovic'; 212.317855446654 False
How many matches did Taylor Fritz win on grass courts? SELECT COUNT(*) FROM matches WHERE winner_name = 'Taylor Fritz' AND surface = 'Grass'; 32 False
What is the maximum number of team rebounds recorded by the Dallas Mavericks in away games where they committed more than 20 fouls? SELECT MAX(o.team_rebounds_away) FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_abbreviation_away = 'DAL' AND g.pf_away > 20 AND g.season_id = '22021'; 16 True
What is the highest number of assists recorded by the Indiana Pacers in a single home game? SELECT MAX(ast_home) FROM game WHERE team_name_home = 'Indiana Pacers'; 44.0 True
In which season did the Golden State Warriors have the highest average reb at home? SELECT season_id, AVG(reb_home) as avg_stat FROM game WHERE team_name_home = 'Golden State Warriors' GROUP BY season_id ORDER BY avg_stat DESC LIMIT 1; 1974.0 True
What is the average number of ft_pct in home games by the Los Angeles Lakers? SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Los Angeles Lakers'; 0.7450706106870195 True
What is the average number of ast in away games by the Los Angeles Lakers? SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 22.594638949671772 True
What is the total points scored by the Philadelphia Warriors away? SELECT SUM(pts_away) as total_points FROM game WHERE team_name_away = 'Philadelphia 76ers'; 251917.0 True
What is the average number of ast in home games by the Boston Celtics? SELECT AVG(ast_home) FROM game WHERE team_name_home = 'Boston Celtics'; 24.886892177589857 True
How many points did the away team score in the only game where the home team had exactly 69 field goal attempts? SELECT pts_away FROM game WHERE fga_home = 69 LIMIT 1; 81.0 True
Which players scored 50 or more points in a game during the 1990s? SELECT game_id, game_date, CASE WHEN pts_home >= 50 THEN team_name_home ELSE team_name_away END AS team_name, CASE WHEN pts_home >= 50 THEN pts_home ELSE pts_away END AS points FROM game WHERE (pts_home >= 50 OR pts_away >= 50) AND CAST(SUBSTR(season_id, 2) AS INTEGER) BETWEEN 1990 AND 1999 ORDER BY points DESC True
What is the number of matches Novak Djokovic played in 2019? SELECT COUNT(*) FROM matches WHERE (winner_name = 'Novak Djokovic' OR loser_name = 'Novak Djokovic') AND tourney_date BETWEEN 20190101 AND 20191231; 65 False
Get the total number of matches Rafael Nadal has played on or after 2021. SELECT COUNT(*) FROM matches WHERE (winner_name = 'Rafael Nadal' OR loser_name = 'Rafael Nadal') AND tourney_date >= 20210101; 93 False
What is the longest match (in minutes) ever played at the US Open? SELECT MAX(minutes) FROM matches WHERE tourney_name = 'US Open'; 326.0 False
What is the total number of losses Jannik Sinner has at the Roland Garros? SELECT COUNT(*) FROM matches WHERE loser_name = 'Jannik Sinner' AND tourney_name = 'Roland Garros'; 4 False
What percentage of matches in 2023 were best of 3 sets? SELECT CAST(SUM(CASE WHEN best_of = '3' THEN 1 ELSE 0 END) AS FLOAT) / COUNT(*) * 100 FROM matches WHERE tourney_date BETWEEN 20230000 AND 20231231; 98.2765787370104 False
How many distinct countries have had a player ranked in the top 1? SELECT COUNT(DISTINCT p.ioc) FROM rankings r JOIN players p ON r.player = p.player_id WHERE r.rank = 1; 13 False
What is the lowest plus-minus score for the New York Knicks away? SELECT MIN(plus_minus_away) as min_plus_minus FROM game WHERE team_name_away = 'New York Knicks'; -47.0 True
How many times did Novak Djokovic beat Roger Federer at Wimbledon? SELECT COUNT(*) FROM matches WHERE winner_name = 'Novak Djokovic' AND loser_name = 'Roger Federer' AND tourney_name = 'Wimbledon'; 3 False
How many three-pointers did the Golden State Warriors attempt in total during the 2017 season? SELECT SUM(fg3a) AS total_three_attempts FROM ( SELECT fg3a_home AS fg3a FROM game WHERE team_abbreviation_home = 'GSW' AND season_id = '22017' UNION ALL SELECT fg3a_away AS fg3a FROM game WHERE team_abbreviation_away = 'GSW' AND season_id = '22017' ); 2369.0 True
In 2018, which team has the most home wins and how many home wins did they have? SELECT team_abbreviation_home, COUNT(*) FROM game WHERE wl_home = 'W' AND season_id = '22018' GROUP BY team_abbreviation_home ORDER BY COUNT(*) DESC LIMIT 1; (DEN, 34) True
What was the average number of fastbreak points scored by the Los Angeles Lakers in home wins during the 2020 season? SELECT AVG(o.pts_fb_home) AS avg_fastbreak_points FROM game g JOIN other_stats o ON g.game_id = o.game_id WHERE g.team_name_home = 'Los Angeles Lakers' AND g.wl_home = 'W' AND g.season_id = '22020'; 13.64705882 True
How many games did the Miami Heat lose away in the 1996 season? SELECT COUNT(*) as losses FROM game WHERE team_name_away = 'Miami Heat' AND wl_away = 'L' AND season_id = '21996'; 9.0 True
Find the name of the player who won the longest match (by minutes). SELECT winner_name FROM matches ORDER BY minutes DESC LIMIT 1; Federico Coria False
What is the average number of ast in away games by the Milwaukee Bucks? SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Milwaukee Bucks'; 22.16927374301676 True
What was the average points difference in home games won by the Denver Nuggets? SELECT AVG(pts_home - pts_away) FROM game WHERE team_abbreviation_home = 'DEN' AND wl_home = 'W'; 11.96471532 True
What is the total number of rebounds by the Milwaukee Bucks at home? SELECT SUM(reb_home) as total_rebounds FROM game WHERE team_name_home = 'Milwaukee Bucks'; 76050.0 True
Which team has the nickname 'Celtics'? SELECT full_name FROM team WHERE nickname = 'Celtics'; Boston Celtics True
Which away team has scored the most points against the Miami Heat in a single game? SELECT team_name_away, pts_away FROM game WHERE team_abbreviation_home = 'MIA' ORDER BY pts_away DESC LIMIT 1; Milwaukee Bucks|144.0 True
How many points did the home team score in the game with the most lead changes and the fewest total fouls? SELECT pts_home FROM game WHERE game_id = (SELECT game_id FROM other_stats JOIN game USING(game_id) ORDER BY lead_changes DESC, (pf_home + pf_away) ASC LIMIT 1); 122.0 True
How many away games did the Miami Heat play in the 2021 season? SELECT COUNT(*) FROM game WHERE team_name_away = 'Miami Heat' AND season_id = '22021'; 41.0 True
What is the average number of tov in away games by the Miami Heat? SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Miami Heat'; 15.235255570117957 True
How many times has Jannik Sinner defeated Novak Djokovic? SELECT COUNT(*) FROM matches WHERE winner_name = 'Jannik Sinner' AND loser_name = 'Novak Djokovic'; 3 False
How many times did the Boston Celtics win at home during the 2015 season? SELECT COUNT(*) FROM game WHERE team_abbreviation_home = 'BOS' AND season_id = '22015' AND wl_home = 'W'; 28 True
What is the total number of three-pointers made by the Golden State Warriors at home versus the Cleveland Cavaliers in all seasons combined? SELECT SUM(fg3m_home) AS total_threes FROM game WHERE team_name_home = 'Golden State Warriors' AND team_name_away = 'Cleveland Cavaliers'; 407 True