natural_query sql_query result gpt4_queries 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 SELECT AVG(fg_pct_home) FROM game WHERE team_name_home = 'Chicago Bulls'; 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 SELECT SUM(lead_changes) FROM other_stats WHERE team_abbreviation_away = 'DEN'; 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 SELECT team_name_away, COUNT(*) AS games_with_more_oreb_than_dreb FROM game WHERE oreb_away > dreb_away GROUP BY team_name_away ORDER BY games_with_more_oreb_than_dreb DESC LIMIT 1; 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 SELECT MAX(team_rebounds_away) FROM other_stats WHERE team_abbreviation_away = 'DAL' AND pf_away > 20; 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 SELECT AVG(pts_home - pts_away) AS average_margin_of_victory FROM game WHERE team_name_home = 'Miami Heat' AND season_id = '22013' AND wl_home = 'W'; 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 SELECT AVG(pts_fb_home) FROM other_stats WHERE team_abbreviation_home = 'PHI' AND game_id IN (SELECT game_id FROM game WHERE season_id = '22018' AND team_name_home = 'Philadelphia 76ers'); Which team has the nickname 'Celtics'? SELECT full_name FROM team WHERE nickname = 'Celtics'; Boston Celtics SELECT full_name FROM team WHERE nickname = 'Celtics'; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Milwaukee Bucks' AND season_id = '22020'; 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 SELECT AVG(pts_2nd_chance_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE team_name_home = 'Toronto Raptors' AND season_id BETWEEN '22015' AND '22020'; 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 SELECT team_abbreviation_home FROM other_stats WHERE game_id IN (SELECT game_id FROM game WHERE season_id = '22020') ORDER BY pts_fb_home DESC LIMIT 1; 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 SELECT AVG(pts_paint_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE team_name_home = 'Boston Celtics' AND pts_home - pts_away >= 10 AND team_abbreviation_home = 'BOS'; 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 SELECT MAX(pts_home + pts_away) FROM game; 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 SELECT team_name_home, MAX(fg3_pct_home) FROM game WHERE season_id = '22020' GROUP BY team_name_home ORDER BY MAX(fg3_pct_home) DESC LIMIT 1; Which team is located in the state of Indiana? SELECT full_name FROM team WHERE state = 'Indiana'; Indiana Pacers SELECT full_name FROM team WHERE state = 'Indiana'; 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 SELECT MAX(blk_home) FROM game WHERE team_name_home = 'Orlando Magic' AND season_id = '21999'; 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 SELECT AVG(pts_fb_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE team_name_home = 'Houston Rockets' AND wl_home = 'W' AND (pts_home - pts_away) > 15; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Los Angeles Clippers' AND season_id = '22002' AND wl_home = 'L' AND stl_home > stl_away AND blk_home > blk_away; What is the full name of the team based in Dallas? SELECT full_name FROM team WHERE city = 'Dallas'; Dallas Mavericks SELECT full_name FROM team WHERE city = 'Dallas'; 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 SELECT team_name_home AS team_name, COUNT(*) AS total_games FROM game WHERE season_id BETWEEN '21995' AND '22005' GROUP BY team_name_home UNION ALL SELECT team_name_away, COUNT(*) FROM game WHERE season_id BETWEEN '21995' AND '22005' GROUP BY team_name_away ORDER BY total_games DESC LIMIT 1; 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 SELECT COUNT(*) FROM game WHERE team_name_away = 'Miami Heat' AND wl_away = 'L' AND season_id = '21996'; 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 SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Miami Heat'; "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 SELECT SUM(pts_2nd_chance_home) FROM other_stats WHERE team_abbreviation_home = 'MIA'; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Orlando Magic' AND season_id = '22013'; 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 SELECT season_id, AVG(tov_home) AS avg_tov_home FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY avg_tov_home DESC LIMIT 1; 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 SELECT season_id FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY AVG(ft_pct_home) DESC LIMIT 1; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Cleveland Cavaliers' AND season_id = '21996' AND times_tied > 8; 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 SELECT AVG(oreb_home) FROM game WHERE team_name_home = 'Chicago Bulls' AND season_id = '22019'; 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 SELECT MAX(stl_home + blk_home) AS highest_steals_blocks FROM game WHERE team_name_home = 'Toronto Raptors' AND season_id = '22019'; 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 SELECT COUNT(*) FROM game WHERE team_name_away = 'Boston Celtics' AND wl_away = 'W' AND (pts_away - pts_home) >= 20; 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 SELECT SUM(total_turnovers_home) + SUM(total_turnovers_away) as total_turnovers FROM game 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 SELECT MAX(pts_away - pts_home) AS largest_margin_victory FROM game WHERE team_name_away = 'Miami Heat'; 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 SELECT AVG(pts_home - pts_away) AS average_victory_margin FROM game WHERE team_name_home = 'Boston Celtics' AND season_id = '22000'; What are the nicknames of teams based in Florida? SELECT nickname FROM team WHERE state = 'Florida'; Heat, Magic SELECT nickname FROM team WHERE state = 'Florida'; 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 SELECT MAX(reb_away) FROM game; 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 SELECT SUM(reb_home) FROM game WHERE team_name_home = 'San Antonio Spurs' AND season_id = '22015'; 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 SELECT team_abbreviation_away FROM other_stats ORDER BY pts_off_to_away DESC LIMIT 1; 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 SELECT MAX(pts_fb_home) FROM other_stats WHERE team_abbreviation_home = 'HOU'; 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 SELECT AVG(tov_home) FROM game WHERE team_name_home = 'Miami Heat'; 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 SELECT SUM(pts_home) + SUM(pts_away) FROM game 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 SELECT team_name_home, COUNT(*) AS games_lost_with_positive_plus_minus FROM game WHERE wl_home = 'L' AND plus_minus_home > 0 GROUP BY team_name_home ORDER BY games_lost_with_positive_plus_minus DESC LIMIT 1; 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 SELECT season_id FROM game WHERE team_name_home = 'Miami Heat' GROUP BY season_id ORDER BY AVG(ast_home) DESC LIMIT 1; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Chicago Bulls' AND wl_home = 'W' AND season_id = '22010'; 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 SELECT AVG(pts_home) FROM game WHERE team_name_home = 'Denver Nuggets' AND season_id = '22019'; 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 SELECT year_founded FROM team WHERE full_name = 'Los Angeles Clippers'; 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 SELECT AVG(ast_home) FROM game WHERE team_name_home = 'Boston Celtics'; 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 SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 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 SELECT team_id_home AS team_id, total_turnovers_home AS total_turnovers FROM other_stats WHERE game_id IN (SELECT game_id FROM game WHERE season_id = '22019') UNION ALL SELECT team_id_away AS team_id, total_turnovers_away AS total_turnovers FROM other_stats WHERE game_id IN (SELECT game_id FROM game WHERE season_id = '22019') ORDER BY total_turnovers DESC LIMIT 1; 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 SELECT MAX(pts_home) FROM game JOIN other_stats ON game.game_id = other_stats.game_id WHERE team_name_home = 'Miami Heat' AND pts_2nd_chance_home > 10; 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 SELECT SUM(pts_paint_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE game.team_name_home = 'Chicago Bulls' AND game.wl_home = 'L' AND game.season_id = '21996'; 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 SELECT COUNT(*) FROM game WHERE season_id = '22017' AND team_name_home = 'Oklahoma City Thunder' AND pts_home > 30; 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 SELECT SUM(pts_away) FROM game JOIN other_stats ON game.game_id = other_stats.game_id WHERE team_name_away = 'Milwaukee Bucks' AND lead_changes > 5; 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 SELECT * FROM game WHERE season_id = '22015' AND ((team_name_home = 'Houston Rockets' AND team_name_away = 'Dallas Mavericks') OR (team_name_home = 'Dallas Mavericks' AND team_name_away = 'Houston Rockets')); 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 SELECT MAX(reb_home + reb_away) AS highest_combined_rebounds FROM game WHERE team_name_home = 'San Antonio Spurs' OR team_name_away = 'San Antonio Spurs'; 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 SELECT season_id FROM game WHERE team_name_home = 'Chicago Bulls' GROUP BY season_id ORDER BY AVG(ast_home) DESC LIMIT 1; 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 SELECT MIN(plus_minus_away) FROM game WHERE team_name_away = 'New York Knicks'; 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 SELECT SUM(pts_home) + SUM(pts_away) AS total_points FROM game WHERE (team_name_home = 'Chicago Bulls' OR team_name_away = 'Chicago Bulls') AND season_id = '21988'; 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 SELECT SUM(pts_fb_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE team_name_home = 'Memphis Grizzlies' AND season_id = '22005'; 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 SELECT AVG(pts_home - pts_away) FROM game WHERE team_name_home = 'Denver Nuggets' AND wl_home = 'W'; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Memphis Grizzlies' AND season_id = '22008' AND wl_home = 'L' AND stl_home > stl_away AND blk_home > blk_away; 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 SELECT season_id FROM game WHERE team_name_home = 'Boston Celtics' GROUP BY season_id ORDER BY AVG(reb_home) DESC LIMIT 1; 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 SELECT AVG(pts_2nd_chance_away) FROM game JOIN other_stats ON game.game_id = other_stats.game_id WHERE team_name_home != 'New Orleans Pelicans' AND team_name_away = 'New Orleans Pelicans' AND season_id = '22020' AND wl_away = 'W' AND (pts_away - pts_home) < 5; 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 SELECT COUNT(*) FROM game WHERE team_name_away = 'Golden State Warriors' AND wl_away = 'L' AND season_id = '21996'; 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 SELECT team_name_home, COUNT(*) as num_times FROM game WHERE pts_home < 60 GROUP BY team_name_home UNION SELECT team_name_away, COUNT(*) as num_times FROM game WHERE pts_away < 60 GROUP BY team_name_away ORDER BY num_times DESC LIMIT 1; 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 SELECT AVG(fg3m_home) FROM game WHERE team_name_home = 'Golden State Warriors' AND season_id = '22018'; 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 SELECT MAX(largest_lead_home) FROM other_stats WHERE team_abbreviation_home = 'LAL' AND game_id IN (SELECT game_id FROM game WHERE team_name_home = 'Los Angeles Lakers' AND season_id = '22016'); 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 SELECT AVG(pts_paint_away) FROM game JOIN other_stats ON game.game_id = other_stats.game_id WHERE team_name_home = 'Philadelphia 76ers' AND season_id = '22020' AND lead_changes > 15; 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 SELECT pts_home FROM game WHERE game_id = (SELECT game_id FROM other_stats ORDER BY lead_changes DESC, (pf_home + pf_away) ASC LIMIT 1); 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 SELECT COUNT(*) FROM game JOIN other_stats ON game.game_id = other_stats.game_id WHERE game.team_name_away = 'Cleveland Cavaliers' AND game.wl_away = 'L' AND other_stats.pts_fb_away > 10 AND game.season_id = '21996'; 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 SELECT MAX(ast_home + ast_away) AS highest_combined_ast FROM game WHERE team_name_home = 'Orlando Magic' OR team_name_away = 'Orlando Magic'; 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 SELECT AVG(pts_paint_away) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE team_abbreviation_away = 'UTA' AND wl_away = 'W'; 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 SELECT COUNT(*) FROM game WHERE team_name_away = 'Los Angeles Lakers' AND season_id = '21996'; How many games had at least one team with 30+ assists? SELECT COUNT(*) FROM game WHERE ast_home >= 30 OR ast_away >= 30; 11305 SELECT COUNT(*) FROM game WHERE ast_home >= 30 OR ast_away >= 30; 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 SELECT MAX(fg3_pct_away) FROM game WHERE team_name_away = 'Phoenix Suns'; 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 SELECT COUNT(*) FROM game WHERE team_name_away = 'Miami Heat' AND season_id = '22021'; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22015'; 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 SELECT SUM(fta_away) FROM game WHERE team_name_away = 'Houston Rockets' AND wl_away = 'W' AND season_id = '22020'; 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 SELECT team_name_away, MAX(pts_away) FROM game WHERE team_name_home = 'Miami Heat' GROUP BY team_name_away ORDER BY MAX(pts_away) DESC LIMIT 1; 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 SELECT pts_home + pts_away AS total_points FROM game ORDER BY game_date ASC LIMIT 1; 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 SELECT AVG(tov_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 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 SELECT SUM(reb_home) FROM game WHERE team_name_home = 'Milwaukee Bucks'; 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 SELECT MAX(ast_home) FROM game WHERE team_name_home = 'Indiana Pacers'; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Miami Heat' AND pts_home > 120 AND season_id = '22015'; 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 SELECT MIN(total_turnovers_home + total_turnovers_away) AS lowest_combined_turnovers FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE (team_name_home = 'San Antonio Spurs' OR team_name_away = 'San Antonio Spurs') AND season_id = '22019'; 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 SELECT AVG(pts_fb_home) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE game.team_name_home = 'Los Angeles Lakers' AND game.wl_home = 'W' AND game.season_id = '22020'; 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 SELECT MAX(stl_home) FROM game WHERE team_name_home = 'Detroit Pistons' AND season_id = '22004' UNION SELECT MAX(stl_away) FROM game WHERE team_name_away = 'Detroit Pistons' AND season_id = '22004'; 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) SELECT team_name_home, COUNT(*) AS home_wins FROM game WHERE season_id = '22018' AND wl_home = 'W' GROUP BY team_name_home ORDER BY home_wins DESC LIMIT 1; 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 SELECT SUM(fg3a_home) + SUM(fg3a_away) FROM game WHERE (team_name_home = 'Golden State Warriors' OR team_name_away = 'Golden State Warriors') AND season_id = '22017'; 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 SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Houston Rockets'; 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 SELECT COUNT(*) FROM game WHERE team_name_away = 'Boston Celtics' AND wl_away = 'W' AND season_id = '22018'; 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 SELECT MAX(fg3m_home) FROM game WHERE team_name_home = 'Brooklyn Nets'; 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 SELECT SUM(oreb_away) FROM game WHERE team_name_away = 'Houston Rockets' AND season_id = '22018'; 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 SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Miami Heat'; What is the state of the team nicknamed 'Jazz'? SELECT state FROM team WHERE nickname = 'Jazz'; Utah SELECT state FROM team WHERE nickname = 'Jazz'; 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 SELECT MAX(pts_away) FROM game WHERE team_name_away = 'Phoenix Suns'; 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 SELECT season_id, AVG(reb_home) as avg_rebounds FROM game WHERE team_name_home = 'Charlotte Hornets' GROUP BY season_id ORDER BY avg_rebounds DESC LIMIT 1; 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 SELECT team_name_home AS team, AVG(pts_home - pts_away) AS avg_point_diff FROM game WHERE season_id = '22007' GROUP BY team_name_home UNION SELECT team_name_away AS team, AVG(pts_away - pts_home) AS avg_point_diff FROM game WHERE season_id = '22007' GROUP BY team_name_away ORDER BY avg_point_diff LIMIT 1; 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 SELECT season_id, MAX(avg_fg_pct_home) FROM (SELECT season_id, AVG(fg_pct_home) as avg_fg_pct_home FROM game WHERE team_name_home = 'Milwaukee Bucks' GROUP BY season_id) GROUP BY season_id ORDER BY avg_fg_pct_home DESC LIMIT 1; 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 SELECT AVG(ast_home / fgm_home) AS assist_to_fgm_ratio FROM game JOIN other_stats ON game.game_id = other_stats.game_id WHERE team_name_home = 'Brooklyn Nets' AND pts_paint_home > 50; 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 SELECT COUNT(*) FROM game WHERE team_name_away = 'Chicago Bulls' AND season_id = '22020'; 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 SELECT ROUND(AVG(pts_home), 2) FROM game; 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 SELECT season_id, AVG(reb_home) AS avg_rebounds FROM game WHERE team_name_home = 'Golden State Warriors' GROUP BY season_id ORDER BY avg_rebounds DESC LIMIT 1; 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 SELECT full_name FROM team WHERE year_founded BETWEEN 1970 AND 1979 AND nickname LIKE 'C%'; 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 SELECT MAX(ft_pct_home + ft_pct_away) AS highest_combined_ft_pct FROM game WHERE team_name_home = 'Los Angeles Lakers' OR team_name_away = 'Los Angeles Lakers'; 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 SELECT AVG(pts_fb_home) FROM other_stats WHERE team_abbreviation_home = 'LAC' AND game_id IN (SELECT game_id FROM game WHERE team_name_home = 'Los Angeles Clippers' AND season_id = '22020'); 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 SELECT AVG(fg3m_away) FROM game WHERE tov_away > ast_away; 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 SELECT AVG(fta_home) - AVG(fta_away) AS avg_fta_difference FROM game WHERE team_name_home = 'Brooklyn Nets' AND season_id = '22020'; 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 SELECT SUM(pts_away) FROM game WHERE team_name_away = 'Philadelphia Warriors'; 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 SELECT MAX(game_date) FROM game WHERE team_name_home = 'New York Knicks' AND wl_home = 'W'; 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 SELECT MIN(pts_home + pts_away) AS lowest_scoring_game FROM game WHERE (team_name_home = 'Indiana Pacers' OR team_name_away = 'Indiana Pacers') AND season_id = '21994'; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Sacramento Kings' AND wl_home = 'L' AND season_id = '21996'; 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 SELECT pts_home + pts_away AS total_score FROM game WHERE fgm_home = 33; 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 SELECT (pts_2nd_chance_home - pts_2nd_chance_away) AS second_chance_point_difference FROM other_stats WHERE game_id IN (SELECT game_id FROM game WHERE team_name_home = 'Chicago Bulls' AND season_id = '22016' ORDER BY ABS(pts_home - pts_away) ASC LIMIT 1); 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 SELECT MAX(plus_minus_home) FROM game WHERE team_name_home = 'Indiana Pacers'; 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 SELECT SUM(fg3m_home) FROM game WHERE team_name_home = 'Golden State Warriors' AND matchup_home LIKE '%CLE%'; 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 SELECT pts_away FROM game WHERE fga_home = 69; 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 SELECT AVG(ast_away) FROM game WHERE team_name_away = 'Milwaukee Bucks'; 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 SELECT SUM(stl_home) + SUM(stl_away) 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'); 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 SELECT team_name_home AS team, COUNT(*) AS num_games FROM game WHERE pts_home > 110 AND pts_away > 110 GROUP BY team_name_home UNION ALL SELECT team_name_away, COUNT(*) FROM game WHERE pts_home > 110 AND pts_away > 110 GROUP BY team_name_away ORDER BY num_games DESC LIMIT 1; 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 SELECT MAX(pts_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 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 SELECT SUM(pts_2nd_chance_away) FROM other_stats WHERE team_abbreviation_away = 'WAS'; 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 SELECT AVG(ast_home) FROM game WHERE team_name_home = 'Golden State Warriors' AND wl_home = 'W' AND season_id = '22018'; 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 SELECT (pts_home + pts_away) AS total_points FROM game WHERE pf_home = pf_away; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Boston Celtics' AND wl_home = 'W' AND season_id = '22020'; 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 SELECT team_name_home FROM game WHERE season_id = '22016' GROUP BY team_name_home ORDER BY AVG(ft_pct_home) DESC LIMIT 1; 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 SELECT AVG(pts_2nd_chance_away) FROM other_stats JOIN game ON other_stats.game_id = game.game_id WHERE game.team_name_home = 'Atlanta Hawks' AND game.wl_home = 'L' AND game.season_id = '22001'; 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 SELECT team_abbreviation_home, AVG(pts_2nd_chance_home) AS avg_second_chance_points FROM other_stats 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 SELECT MAX(pts_home) FROM game WHERE team_name_home = 'Golden State Warriors'; 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 SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Los Angeles Lakers'; 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 SELECT SUM(team_turnovers_home) FROM other_stats WHERE team_abbreviation_home = 'NYK'; 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 SELECT SUM(fg3m_home) AS total_home_three_pointers, SUM(fg3m_away) AS total_away_three_pointers FROM game WHERE (team_name_home = 'Golden State Warriors' OR team_name_away = 'Golden State Warriors') AND season_id = '22016'; 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 SELECT SUM(reb_home) FROM game WHERE team_name_home = 'Miami Heat'; 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 SELECT AVG(fg_pct_away) FROM game WHERE team_name_away = 'Los Angeles Lakers'; 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 SELECT pts_home FROM game JOIN other_stats ON game.game_id = other_stats.game_id ORDER BY other_stats.pts_2nd_chance_home DESC LIMIT 1; 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 SELECT (pts_home + pts_away) AS total_points FROM game WHERE (ftm_home + ftm_away) = 42; 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 SELECT AVG(ft_pct_home) FROM game WHERE team_name_home = 'Charlotte Hornets'; Which team is based in the city of Chicago? SELECT full_name FROM team WHERE city = 'Chicago'; Chicago Bulls SELECT full_name FROM team WHERE city = 'Chicago'; 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 SELECT MAX(largest_lead_home) FROM other_stats WHERE team_abbreviation_home = 'CHI' AND game_id IN (SELECT game_id FROM game WHERE team_name_home = 'Chicago Bulls' AND season_id = '22016'); 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 SELECT player_name FROM player_game_stats WHERE pts >= 50 AND season_id BETWEEN '21990' AND '21999'; 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 SELECT COUNT(*) FROM game WHERE team_name_home = 'Los Angeles Lakers' AND season_id = '22022'; 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 SELECT SUM(pts_paint_away) FROM other_stats WHERE team_abbreviation_away = 'MIL'; 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 SELECT MAX(ABS(pts_home - pts_away)) AS largest_margin_of_victory FROM game; 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 SELECT AVG(pts_away) FROM game WHERE team_name_away = 'Portland Trail Blazers'; 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 SELECT MAX(reb_home) FROM game WHERE season_id = '22005'; 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 SELECT MAX(ast_home + ast_away) AS highest_combined_ast FROM game WHERE team_name_home = 'Boston Celtics' OR team_name_away = 'Boston Celtics'; 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 SELECT SUM(times_tied) FROM other_stats WHERE team_abbreviation_away = 'IND'; 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 SELECT SUM(pts_away) FROM game WHERE oreb_home > 20; 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 SELECT MAX(pts_home + pts_away) AS highest_combined_score 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'); 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) SELECT game_id FROM game WHERE team_name_home = 'Los Angeles Lakers' ORDER BY (pts_home + pts_away) DESC LIMIT 1; 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 SELECT COUNT(*) FROM game JOIN other_stats ON game.game_id = other_stats.game_id WHERE team_name_away = 'Sacramento Kings' AND season_id = '21996' AND wl_away = 'L' AND pts_fb_away > 15; 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 SELECT MIN(pts_away) FROM game WHERE team_name_away = 'Golden State Warriors';