db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
professional_basketball | select cast(sum(case when rank = 1 then 1 else 0 end) as real) * 100 / count(name) from teams | Question: what is the percentage of the teams who had post season (playoff) were ranked number 1? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, fi... | what is the percentage of the teams who had post season (playoff) were ranked number 1? |
professional_basketball | select coachid, won, lost from coaches where year = 1950 and tmid = 'bos' | Question: who is the coach for 'bos' team in year 1950. list the coach id together with the number of game won and lost. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection,... | who is the coach for 'bos' team in year 1950. list the coach id together with the number of game won and lost. |
professional_basketball | select coachid, tmid from coaches where year between 1970 and 1980 order by stint desc limit 1 | Question: who is the longest serving coach from year 1970 to 1980. list the coach id and the team(s) he served. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOve... | who is the longest serving coach from year 1970 to 1980. list the coach id and the team(s) he served. |
professional_basketball | select t1.coachid, t2.name, t2.won from coaches as t1 inner join teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.year = 2000 and t2.won > 50 | Question: in year 2000, who are the coaches with more than 50 games won. list the coachid, team name and number of game won at home game. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound... | in year 2000, who are the coaches with more than 50 games won. list the coachid, team name and number of game won at home game. |
professional_basketball | select distinct t1.coachid, t2.tmid, t1.year from coaches as t1 inner join teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.year between 2000 and 2010 and t2.lost > t2.won | Question: list all the coaches with more game lost than won from year 2000-2010. list the coach id, team name and year. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, ... | list all the coaches with more game lost than won from year 2000-2010. list the coach id, team name and year. |
professional_basketball | select t2.name, t1.year, t2.o_pts from coaches as t1 inner join teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.year between 1990 and 1995 and t1.coachid = 'adelmri01' | Question: which are the teams coached by 'adelmri01' from year 1990-1995. list the team name, year and offense point. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, dr... | which are the teams coached by 'adelmri01' from year 1990-1995. list the team name, year and offense point. |
professional_basketball | select distinct t2.name, t1.year, t1.coachid from coaches as t1 inner join teams as t2 on t1.tmid = t2.tmid where cast(t2.won as real) * 100 / t2.games > 90 | Question: which team(s) had 90% games won. list the coach id for the team and year played. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName... | which team(s) had 90% games won. list the coach id for the team and year played. |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where t1.birthstate = 'ny' and t2.award = 'all-defensive first team' and t2.year between 1980 and 2000 | Question: what is the percentage of player who won 'all-defensive first team' from 1980 - 2000 is from 'ny'. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOveral... | what is the percentage of player who won 'all-defensive first team' from 1980 - 2000 is from 'ny'. |
professional_basketball | select distinct t3.divid from awards_coaches as t1 inner join coaches as t2 on t1.coachid = t2.coachid inner join teams as t3 on t2.tmid = t3.tmid where t1.year = 1977 and t1.award = 'nba coach of the year' and t3.year = 1976 | Question: what division did the team coached by the winner of the 1977 nba coach of the year award play in in 1976? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draf... | what division did the team coached by the winner of the 1977 nba coach of the year award play in in 1976? |
professional_basketball | select distinct t2.coachid from coaches as t1 inner join awards_coaches as t2 on t1.coachid = t2.coachid inner join teams as t3 on t3.tmid = t1.tmid where t2.award = 'nba coach of the year' and t2.year between 1970 and 1979 and t1.year = 1981 and t3.name = 'chicago bulls' | Question: which coach of the chicago bulls during the year 1981 won the nba coach of the year award in the 1970s? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftO... | which coach of the chicago bulls during the year 1981 won the nba coach of the year award in the 1970s? |
professional_basketball | select t2.namenick from player_allstar as t1 inner join players as t2 on t1.playerid = t2.playerid where t1.blocks = 2 and t1.conference = 'west' and t1.season_id = 2006 | Question: what is the nickname of the nba player whose team competed in the western conference in the season 2006 and who had a total of two blocks? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear,... | what is the nickname of the nba player whose team competed in the western conference in the season 2006 and who had a total of two blocks? |
professional_basketball | select t2.year from series_post as t1 inner join teams as t2 on t1.tmidwinner = t2.tmid where t1.round = 'dsf' and t1.tmidloser = 'hsm' order by t2.rank asc limit 1 | Question: in what year did the only team to beat the houston in the final round of postseason series games earn its lowest ranking? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draf... | in what year did the only team to beat the houston in the final round of postseason series games earn its lowest ranking? |
professional_basketball | select t1.birthdate from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t2.season_id = 1985 order by t2.assists desc limit 1 | Question: what is the birth date of the player with the most assists during the 1985 all-star season? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID... | what is the birth date of the player with the most assists during the 1985 all-star season? |
professional_basketball | select distinct t1.firstname, t1.middlename, t1.lastname from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.birthcity = 'winter haven' and t2.season_id between 1980 and 1989 and t2.minutes = 12 | Question: which player, born in winter haven, played 12 minutes per season during the 1980s in the all-stars? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOvera... | which player, born in winter haven, played 12 minutes per season during the 1980s in the all-stars? |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t2.conference = 'east' and t2.minutes <= 5 and t1.college = 'illinois' | Question: of all the all-star players who played in the eastern conference for no more than 5 minutes, how many went to illinois college? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound... | of all the all-star players who played in the eastern conference for no more than 5 minutes, how many went to illinois college? |
professional_basketball | select count(distinct playerid) from player_allstar where cast(d_rebounds as real) * 100 / rebounds > 75 and season_id between 1990 and 2007 | Question: between the years 1990 and 2007, of the total rebounds achieved by each player, how many managed to exceed 75% of defensive rebounds? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draf... | between the years 1990 and 2007, of the total rebounds achieved by each player, how many managed to exceed 75% of defensive rebounds? |
professional_basketball | select year from coaches where coachid = 'costela01' order by cast(won as real) / (won + lost) desc limit 1 | Question: in which year costela01 obtained the best balance of games won as a coach? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, last... | in which year costela01 obtained the best balance of games won as a coach? |
professional_basketball | select sum(t2.minutes) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.birthcity = 'brooklyn' and t1.namenick like '%superman%' | Question: how many total minutes has the brooklyn-born player, known by the name of superman, played during all of his nba all-star seasons? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRo... | how many total minutes has the brooklyn-born player, known by the name of superman, played during all of his nba all-star seasons? |
professional_basketball | select t3.tmid from awards_coaches as t1 inner join coaches as t2 on t1.coachid = t2.coachid inner join teams as t3 on t3.tmid = t2.tmid where t1.year = 1994 and t1.award = 'nba coach of the year' group by t3.tmid order by sum(t3.homelost) desc limit 1 | Question: of all the teams coached by the winner of the 1994 nba coach of the year award, which team has lost the most times playing at home? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftR... | of all the teams coached by the winner of the 1994 nba coach of the year award, which team has lost the most times playing at home? |
professional_basketball | select distinct t2.tmid from series_post as t1 inner join teams as t2 on t1.tmidwinner = t2.tmid where t2.won > 60 and t1.year = 1996 and t1.round = 'csf' and t1.tmidloser = 'lal' | Question: which winning team in the final round of the postseason series games against the lal won more than 60 games in the nba league during the year 1996? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, d... | which winning team in the final round of the postseason series games against the lal won more than 60 games in the nba league during the year 1996? |
professional_basketball | select t2.lgid from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid group by t2.lgid, t1.weight having t1.weight = max(t1.weight) - max(t1.weight) * 0.4 | Question: in which league did the player who weighs 40% less than the heaviest player and whose height is 80 inches play? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection... | in which league did the player who weighs 40% less than the heaviest player and whose height is 80 inches play? |
professional_basketball | select coachid from coaches group by coachid having count(distinct tmid) > 2 | Question: please list the name of the coach who has served more than 2 nba teams. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastNam... | please list the name of the coach who has served more than 2 nba teams. |
professional_basketball | select coachid from coaches order by post_wins desc limit 1 | Question: what is the name of the coach during whose period of coaching, a team has the most numbers of games won in the post-season games? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRou... | what is the name of the coach during whose period of coaching, a team has the most numbers of games won in the post-season games? |
professional_basketball | select coachid from coaches where lgid = 'nba' and post_wins != 0 and post_losses != 0 and coachid in ( select coachid from coaches where lgid = 'nba' group by coachid having count(tmid) > 2 ) order by post_losses asc limit 1 | Question: among the coaches who have served more than 2 nba teams, during which coach's period of coaching, a team has the least numbers of games lost in the post-season games? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_los... | among the coaches who have served more than 2 nba teams, during which coach's period of coaching, a team has the least numbers of games lost in the post-season games? |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid where t2.lgid = 'aba' and (t1.pos = 'c' or t1.pos = 'f-c') | Question: among the players from the aba league, how many of them have the center position? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstNam... | among the players from the aba league, how many of them have the center position? |
professional_basketball | select distinct t1.firstname from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid where (t1.pos = 'f' or t1.pos = 'f-c') and t2.lgid = 'nba' | Question: please list the first name of the players from the nba league with the forward position. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, f... | please list the first name of the players from the nba league with the forward position. |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.hscity = 'chicago' and t2.conference = 'west' | Question: among the players who went to high school in chicago, how many of them belongs to the west conference? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOv... | among the players who went to high school in chicago, how many of them belongs to the west conference? |
professional_basketball | select distinct t1.college from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t2.conference = 'east' | Question: for the players who belongs to the east conference, please list the name of the college they went to. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOve... | for the players who belongs to the east conference, please list the name of the college they went to. |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid where t1.birthcity = 'spencer' and t2.lgid = 'nbl' | Question: among the players from the nbl league, how many of them were born in spencer? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, l... | among the players from the nbl league, how many of them were born in spencer? |
professional_basketball | select t1.birthdate from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where t2.award = 'most valuable player' group by t1.playerid, t1.birthdate order by count(award) desc limit 1 | Question: please list the birth date of the player who has won the most mvps. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, s... | please list the birth date of the player who has won the most mvps. |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where t2.award = 'most valuable player' and t1.birthcity = 'houston' | Question: among the players born in whitestone, how many of them have won the mvp? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastNa... | among the players born in whitestone, how many of them have won the mvp? |
professional_basketball | select t1.height from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where t2.award = 'rookie of the year' order by t1.height desc limit 1 | Question: among the players who have won the award of rookie of the year, what is the height of the tallest player? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draf... | among the players who have won the award of rookie of the year, what is the height of the tallest player? |
professional_basketball | select avg(t1.weight) from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where t2.award = 'rookie of the year' | Question: what is the average weight of the players who have won the award of rookie of the year? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, fi... | what is the average weight of the players who have won the award of rookie of the year? |
professional_basketball | select avg(t1.height) from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where t2.award = 'most valuable player' and t1.birthcity = 'new york' | Question: among the players that went to high school in new york and have won the mvp, what is their average height? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, dra... | among the players that went to high school in new york and have won the mvp, what is their average height? |
professional_basketball | select tmid from players_teams where year = 2000 group by tmid order by sum(postpoints) desc limit 10 | Question: please list the top ten teams with the highest scores in 2000. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffix... | please list the top ten teams with the highest scores in 2000. |
professional_basketball | select name from teams where cast(won as real) * 100 / (won + lost) < 50 | Question: which teams have winning rate less than 50%? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, playerID, dr... | which teams have winning rate less than 50%? |
professional_basketball | select coachid from coaches group by tmid, coachid, won, lost having cast(won as real) * 100 / (won + lost) > 80 | Question: who are the coaches for team with winning rate of 80% and above? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suff... | who are the coaches for team with winning rate of 80% and above? |
professional_basketball | select coachid from coaches where lgid = 'nba' group by coachid having max(year) - min(year) > 10 | Question: which coach has serviced in nba for more than 10 years. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, p... | which coach has serviced in nba for more than 10 years. |
professional_basketball | select count(distinct t4.name) from ( select t1.name, sum(t2.points) from teams as t1 inner join players_teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year inner join awards_players as t3 on t2.playerid = t3.playerid where t3.award = 'most valuable player' group by t1.name having sum(t2.points) >= 3800 ) as t4 | Question: how many teams have played more than 3800 points and have player with 'most valuable player' award? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOvera... | how many teams have played more than 3800 points and have player with 'most valuable player' award? |
professional_basketball | select t1.firstname, t1.middlename, t1.lastname from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid where t2.tmid = 'afs' order by t1.height desc limit 1 | Question: which player from 'afs' team has the tallest height? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, play... | which player from 'afs' team has the tallest height? |
professional_basketball | select t1.lastname from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid where t2.tmid = 'blb' | Question: please list down the last name of players from 'blb' team. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName... | please list down the last name of players from 'blb' team. |
professional_basketball | select count(distinct coachid) from awards_coaches where year between 1962 and 1975 | Question: from 1962 to 1975, how many coaches received the award? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, p... | from 1962 to 1975, how many coaches received the award? |
professional_basketball | select coachid from awards_coaches where year between 1970 and 1990 group by coachid, award having count(award) = 2 | Question: please list the coach ids who received the award twice from 1970 to 1990. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastN... | please list the coach ids who received the award twice from 1970 to 1990. |
professional_basketball | select count(distinct coachid) from awards_coaches where year between 1962 and 2011 and award = 'aba coach of the year' and coachid in ( select coachid from awards_coaches where year between 1962 and 2011 and award = 'nba coach of the year' ) | Question: from 1962 to 2011, how many coaches received both nba and aba awards? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName,... | from 1962 to 2011, how many coaches received both nba and aba awards? |
professional_basketball | select avg(t2.points) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t2.season_id = 1975 | Question: in 1975, what was the average point of all-star players coming from the usa? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, la... | in 1975, what was the average point of all-star players coming from the usa? |
professional_basketball | select distinct t1.lastname, t1.firstname from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.height > 75 | Question: please list the last names and first names of all-star players who are higher than 75 inch. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID... | please list the last names and first names of all-star players who are higher than 75 inch. |
professional_basketball | select min(t1.weight) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.college = 'ucla' | Question: what is the minimum weight of all-star players coming from ucla college? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastNa... | what is the minimum weight of all-star players coming from ucla college? |
professional_basketball | select max(t1.weight) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.birthcountry = 'usa' | Question: what is the maximum weight of usa all-star players? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, playe... | what is the maximum weight of usa all-star players? |
professional_basketball | select sum(t2.points) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t2.season_id between 1960 and 1970 and t1.deathdate = '0000-00-00' | Question: from 1960 to 1970, what is the total point of all-star players who are still alive? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstN... | from 1960 to 1970, what is the total point of all-star players who are still alive? |
professional_basketball | select distinct t1.lastname, t1.firstname from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.birthdate > 1950 and cast(t2.o_rebounds as real) * 100 / t2.rebounds > 30 | Question: among players who were born after 1950, who had offence rebounds rates more than 30%? please list their last names and first names. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftR... | among players who were born after 1950, who had offence rebounds rates more than 30%? please list their last names and first names. |
professional_basketball | select count(playerid) from awards_players where year between 1969 and 2010 and award = 'rookie of the year' | Question: how many players received rookie of the year award from 1969 to 2010? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName,... | how many players received rookie of the year award from 1969 to 2010? |
professional_basketball | select t1.tmid from players_teams as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid group by t1.tmid having count(distinct t1.playerid) >= 3 | Question: please list the team names which have at least 3 all-star players. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, su... | please list the team names which have at least 3 all-star players. |
professional_basketball | select max(t2.points) from teams as t1 inner join players_teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.year between 1950 and 1970 and t1.rank = 1 | Question: from 1950 to 1970, what is the maximum point of players whose teams were ranked 1? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstNa... | from 1950 to 1970, what is the maximum point of players whose teams were ranked 1? |
professional_basketball | select t5.lastname, t5.firstname from players_teams as t4 inner join players as t5 on t4.playerid = t5.playerid where t4.year between 1937 and 1940 and t4.tmid in ( select distinct t1.tmid from teams as t1 inner join teams as t2 inner join teams as t3 on t1.tmid = t2.tmid and t2.tmid = t3.tmid and t3.year - t2.year = 1... | Question: please list the last names and first names of all-star players whose team were ranked 1 for consecutive 3 years from 1937 to 1940. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRo... | please list the last names and first names of all-star players whose team were ranked 1 for consecutive 3 years from 1937 to 1940. |
professional_basketball | select distinct t1.name from teams as t1 inner join players_teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.rank = 3 and t1.year between 1937 and 1940 order by t2.points desc limit 1 | Question: among the teams that were ranked 3 from 1937 to 1940, what is the team name whose players had the highest point? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelectio... | among the teams that were ranked 3 from 1937 to 1940, what is the team name whose players had the highest point? |
professional_basketball | select count(*) from ( select t2.name, sum(t1.points) from players_teams as t1 inner join teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year where t1.year = 1937 group by t2.name having sum(points) >= 500 ) as t3 | Question: in 1937, how many teams whose players got at least 500 points? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffix... | in 1937, how many teams whose players got at least 500 points? |
professional_basketball | select count(distinct t1.playerid) from players_teams as t1 inner join teams as t2 on t1.tmid = t2.tmid and t1.year = t2.year where cast(t2.won as real) * 100 / cast(t2.games as real) > 75 and t1.year = 1990 | Question: in 1990, how many players whose teams had the winning rate of more than 75%? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, la... | in 1990, how many players whose teams had the winning rate of more than 75%? |
professional_basketball | select firstname, lastname from players where race = 'b' and height > 0 order by height asc limit 3 | Question: please list the top three shortest black players. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, playerI... | please list the top three shortest black players. |
professional_basketball | select count(distinct playerid) from draft where firstname = 'joe' and draftyear = 1970 | Question: how many players with the first name joe were drafted in 1970? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffix... | how many players with the first name joe were drafted in 1970? |
professional_basketball | select count(fg_made) from player_allstar where first_name = 'george' and last_name = 'mikan' and season_id between 1951 and 1953 | Question: how many field goals did george mikan make overall between 1951 and 1953? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastN... | how many field goals did george mikan make overall between 1951 and 1953? |
professional_basketball | select min(cast(weight as real) / (height * height)) , max(cast(weight as real) / (height * height)) from players | Question: what are the basketball players' bmi ranges? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, playerID, dr... | what are the basketball players' bmi ranges? |
professional_basketball | select name from teams order by cast(homewon as real) / (homewon + homelost) desc limit 1 | Question: what is the name of the team with the highest home lost rate? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixN... | what is the name of the team with the highest home lost rate? |
professional_basketball | select draftyear - strftime('%y', birthdate) from draft as t1 inner join players as t2 on t1.playerid = t2.playerid where t1.firstname = 'alexis' and t1.lastname = 'ajinca' and draftround = 1 | Question: how old was alexis ajinca when he was first drafted? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, play... | how old was alexis ajinca when he was first drafted? |
professional_basketball | select t1.firstname, t1.lastname from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid inner join teams as t3 on t3.tmid = t2.tmid where t3.name = 'denver nuggets' and t2.year > 1980 order by t1.height desc limit 1 | Question: who is the tallest player in denver nuggets since 1980? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, p... | who is the tallest player in denver nuggets since 1980? |
professional_basketball | select t1.playerid from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where deathdate is not null group by t1.playerid order by count(award) desc limit 1 | Question: among the players who have passed away, who had the most award? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffi... | among the players who have passed away, who had the most award? |
professional_basketball | select t3.name from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid inner join teams as t3 on t3.tmid = t2.tmid where t1.college = 'ucla' group by t3.name order by count(distinct t1.playerid) desc limit 1 | Question: what is the full name of the team that has the most players from ucla? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName... | what is the full name of the team that has the most players from ucla? |
professional_basketball | select avg(cast(t1.weight as real) / (t1.height * t1.height)) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid | Question: what is the average bmi of an all-star player? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, playerID, ... | what is the average bmi of an all-star player? |
professional_basketball | select t1.name from teams as t1 inner join ( select * from teams where lgid = 'aba' and year = 1972 ) as t2 on t1.tmid = t2.tmid where t1.lgid = 'aba' and t1.year = 1973 order by (cast(t1.won as real) / (t1.won + t1.lost) - (cast(t2.won as real) / (t2.won + t2.lost))) desc limit 1 | Question: what is the full name of the team with the fastest growth in winning rate in the 'aba' league from 1972 to 1973? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelectio... | what is the full name of the team with the fastest growth in winning rate in the 'aba' league from 1972 to 1973? |
professional_basketball | select t1.firstname from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid where t2.lgid = 'nbl' group by t1.playerid, t1.firstname order by count(pf) desc limit 1 | Question: please list the first names of the players with the most personal fouls in the 'nbl' league. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmI... | please list the first names of the players with the most personal fouls in the 'nbl' league. |
professional_basketball | select avg(distinct height) from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where conference = 'east' | Question: what is the average height of an east conference all-star player? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suf... | what is the average height of an east conference all-star player? |
professional_basketball | select t1.coachid from coaches as t1 inner join awards_coaches as t2 on t1.coachid = t2.coachid where t2.award = 'aba coach of the year' group by t1.coachid, t1.won order by t1.won desc limit 1 | Question: among the coaches who won the 'aba coach of the year' award, which is the coach with the highest number of won games? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSel... | among the coaches who won the 'aba coach of the year' award, which is the coach with the highest number of won games? |
professional_basketball | select name from teams as t1 inner join coaches as t2 on t1.tmid = t2.tmid and t1.year = t2.year inner join awards_coaches as t3 on t2.coachid = t3.coachid and t2.year = t3.year where t3.year = 1992 and award = 'nba coach of the year' | Question: what is the full name of the team that the 'nba coach of the year' 1992 winner coached? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, fi... | what is the full name of the team that the 'nba coach of the year' 1992 winner coached? |
professional_basketball | select t1.firstname, t1.lastname from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid where year = 1973 order by cast(t2.fgmade as real) / t2.fgattempted desc limit 1 | Question: what is the first and last name of the player with the highest field goal made rate in 1973? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmI... | what is the first and last name of the player with the highest field goal made rate in 1973? |
professional_basketball | select t1.name from teams as t1 inner join draft as t2 on t1.tmid = t2.tmid and t1.year = t2.draftyear where t2.firstname = 'mike' and t2.lastname = 'lynn' | Question: what is the full name of the team that selected mike lynn? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName... | what is the full name of the team that selected mike lynn? |
professional_basketball | select count(distinct t2.playerid) from awards_players as t1 inner join players as t2 on t1.playerid = t2.playerid where t1.award = 'most improved player' and t2.birthcountry = 'usa' and t1.year between 1985 and 1990 | Question: among the most improved players awarded from 1985-1990, how many player whose country is usa? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tm... | among the most improved players awarded from 1985-1990, how many player whose country is usa? |
professional_basketball | select distinct t1.firstname, t1.lastname from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.college = 'california' | Question: please list out the first name and last name of player who attended california college and have been selected as all stars? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, dr... | please list out the first name and last name of player who attended california college and have been selected as all stars? |
professional_basketball | select count(coachid) from awards_coaches where year between 1950 and 1970 group by coachid having count(coachid) > 1 | Question: from 1950 to 1970, how many coaches who received more than 1 award? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, s... | from 1950 to 1970, how many coaches who received more than 1 award? |
professional_basketball | select count(distinct playerid) from awards_players where year between 1969 and 1975 and award = 'most valuable player' | Question: how many players received most valuable player award from 1969 to 1975? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastNam... | how many players received most valuable player award from 1969 to 1975? |
professional_basketball | select distinct name from teams where tmid in ( select tmid from players_teams as t1 inner join players as t2 on t1.playerid = t2.playerid where t2.birthstate is not null group by t1.tmid, t2.birthstate having count(*) > 5 ) | Question: please list the team names which have at least 5 players were born in the same state. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firs... | please list the team names which have at least 5 players were born in the same state. |
professional_basketball | select count(*) from ( select tmid from players_teams as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.lgid = 'nba' group by t1.tmid having count(distinct t1.playerid) > 3 ) as t3 | Question: how many teams in the nba which has at least 3 all-star players? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suff... | how many teams in the nba which has at least 3 all-star players? |
professional_basketball | select t1.birthstate from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid group by t1.birthstate order by count(distinct t1.playerid) desc limit 1 | Question: which state has the most players selected as all stars? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, p... | which state has the most players selected as all stars? |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid inner join teams as t3 on t3.tmid = t2.tmid where t3.year = 1937 and t3.rank = 6 | Question: how many players whose teams were ranked 6 in 1937? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, playe... | how many players whose teams were ranked 6 in 1937? |
professional_basketball | select count(distinct t1.playerid) from players as t1 inner join players_teams as t2 on t1.playerid = t2.playerid inner join teams as t3 on t3.tmid = t2.tmid where cast(t3.lost as real) * 100 / (t3.lost + t3.won) < 20 | Question: in 1950, how many players whose teams have the losing rate less than 20%? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastN... | in 1950, how many players whose teams have the losing rate less than 20%? |
professional_basketball | select firstname, middlename, lastname from players where birthcountry != 'usa' | Question: list the full name of players who are born outside usa. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, p... | list the full name of players who are born outside usa. |
professional_basketball | select coachid from coaches group by coachid having count(distinct tmid) > 2 | Question: list out all the coach id who have served more than 2 different teams. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName... | list out all the coach id who have served more than 2 different teams. |
professional_basketball | select coachid from coaches where year = 1988 order by won - lost desc limit 1 | Question: which coach has the most 'won' than 'lost' in year '1988'? | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName... | which coach has the most 'won' than 'lost' in year '1988'? |
professional_basketball | select distinct t1.tmid from coaches as t1 inner join awards_coaches as t2 on t1.coachid = t2.coachid where t2.year = 2010 and t2.award = 'nba coach of the year' | Question: name the team in which the coach won the title 'nba coach of the year' in 2010. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName,... | name the team in which the coach won the title 'nba coach of the year' in 2010. |
professional_basketball | select distinct t1.firstname, t1.lastname, t1.height, t1.weight from players as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t2.ft_attempted > 0 and ft_attempted = ft_made | Question: list the first name, last name, height and weight of the players who has all free throw attempted successfully made. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSele... | list the first name, last name, height and weight of the players who has all free throw attempted successfully made. |
professional_basketball | select distinct t1.firstname, t1.lastname, t3.name from players as t1 inner join draft as t2 on t1.playerid = t2.playerid inner join teams as t3 on t2.tmid = t3.tmid where t2.draftfrom = 'seattle' and t2.draftyear between 1965 and 1970 | Question: list the first name, last name and team name of players who are drafted from 'seattle' between year 1965 to 1970. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelecti... | list the first name, last name and team name of players who are drafted from 'seattle' between year 1965 to 1970. |
professional_basketball | select t1.firstname, t1.middlename, t1.lastname , 2003 - strftime('%y', t1.birthdate) from awards_players as t2 join players as t1 on t2.playerid = t1.playerid where t2.award = 'finals mvp' and t2.year = 2003 | Question: list the full name and age of the player when he won the 'finals mvp' in 2003. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, ... | list the full name and age of the player when he won the 'finals mvp' in 2003. |
professional_basketball | select distinct t1.name, t2.year from teams as t1 join series_post as t2 on t1.tmid = t2.tmidwinner where t2.round = 'f' and t2.year between 1950 and 1960 | Question: list the champion (team name) and year from year 1950 to 1960. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffix... | list the champion (team name) and year from year 1950 to 1960. |
professional_basketball | select distinct t1.coachid, t3.name from coaches as t1 join series_post as t2 on t1.tmid = t2.tmidwinner join teams as t3 on t3.tmid = t1.tmid where t2.round = 'qf' and t2.year = 1946 | Question: name the teams along with the coaches that went to 'quarter final' round in 1946. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstNam... | name the teams along with the coaches that went to 'quarter final' round in 1946. |
professional_basketball | select distinct t3.firstname, t3.middlename, t3.lastname from series_post as t1 inner join players_teams as t2 on t1.tmidwinner = t2.tmid inner join players as t3 on t3.playerid = t2.playerid where t1.year = 1970 and t1.round = 'f' | Question: list out all the players fullname who won the championship in 1970. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, s... | list out all the players fullname who won the championship in 1970. |
professional_basketball | select college from players where playerid = ( select playerid from awards_players where year = 1970 group by playerid order by count(award) desc limit 1 ) | Question: from which college was the player who won the most award in 1970. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suf... | from which college was the player who won the most award in 1970. |
professional_basketball | select t1.firstname, t1.middlename, t1.lastname from players as t1 inner join awards_players as t2 on t1.playerid = t2.playerid where t2.award = 'rookie of the year' order by t1.birthdate desc limit 1 | Question: name the youngest player who ever won 'rookie of the year'. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixNam... | name the youngest player who ever won 'rookie of the year'. |
professional_basketball | select t1.firstname, t1.middlename, t1.lastname from players as t1 inner join draft as t2 on t1.playerid = t2.playerid where t2.draftround = 1 and t1.birthcountry != 'usa' and t2.draftyear = 1973 | Question: list the full name of players who are drafted from round 1 in 1973 but not born in usa. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, fi... | list the full name of players who are drafted from round 1 in 1973 but not born in usa. |
professional_basketball | select cast(sum(t2.o_rebounds) as real) * 100 / sum(t2.rebounds) from players_teams as t1 inner join player_allstar as t2 on t1.playerid = t2.playerid where t1.year = 2000 | Question: what is the percentage of offense rebounds from the total rebounds of the players in year 2000. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, ... | what is the percentage of offense rebounds from the total rebounds of the players in year 2000. |
professional_basketball | select distinct t1.year, t2.name, t1.coachid from coaches as t1 inner join teams as t2 on t1.tmid = t2.tmid where cast(t1.won as real) / cast((t1.won + t1.lost) as real) > 0.75 | Question: list the year, team and coach that with winning rate of above 75%. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, su... | list the year, team and coach that with winning rate of above 75%. |
professional_basketball | select distinct coachid from coaches as t1 inner join teams as t2 on t1.tmid = t2.tmid where name = 'oklahoma city thunder' | Question: list all the coatches of the oklahoma city thunder | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, suffixName, player... | list all the coatches of the oklahoma city thunder |
professional_basketball | select count(playerid) from players_teams where cast(orebounds as real) * 100 / drebounds <= 50 and year = 1990 | Question: how many players, in games played in 1990, achieved 50% or less of orebounds than drebounds. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmI... | how many players, in games played in 1990, achieved 50% or less of orebounds than drebounds. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.