Chinastark/bird_dataset huggingface dataset:
Database: hockey
Question: What is the power play chances of New York Rangers in 2009?
Evidence: power play chanses = DIVIDE (PPG, PPC); name = New York Rangers; year = 2009
SQL: SELECT CAST(PPG AS REAL) / PPC FROM Teams WHERE year = 2009 AND name = 'New York Rangers'
Database: hockey
Question: What is the highest total points a team got in a year?
Evidence: the highest total points = MAX(Pts)
SQL: SELECT SUM(Pts), year FROM Teams GROUP BY year, tmID ORDER BY SUM(Pts) DESC LIMIT 1
Database: hockey
Question: Among the teams that had more wins than loses in the year 2006, how many of them have over 100 points?
Evidence: more wins than loses refers to W > L; over 100 points refers to Pts > 100
SQL: SELECT COUNT(tmID) FROM Teams WHERE year = 2006 AND W > L AND Pts > 100
Database: hockey
Question: Which team got the most bench minor penalties in 2006?
Evidence: team refers to name; year = 2006
SQL: SELECT name FROM Teams WHERE year = 2006 GROUP BY tmID, name ORDER BY CAST(SUM(BenchMinor) AS REAL) / 2 DESC LIMIT 1
Database: hockey
Question: Please list the first 3 teams that got the most penalty minutes in 2006.
Evidence: the first 3 teams that got the most penalty minutes refer to name where MAX(PIM) limit to 3; year = 2006;
SQL: SELECT name FROM Teams WHERE year = 2006 GROUP BY tmID, name ORDER BY SUM(PIM) DESC LIMIT 3
Database: hockey
Question: Which team had the highest penalty kill chances in 1995, Florida Panthers, Edmonton Oilers or Los Angeles Kings?
Evidence: the highest penalty kill chances refer to MAX(PKC); year = 1995;
SQL: SELECT name FROM Teams WHERE year = 1995 AND name IN ('Florida Panthers', 'Edmonton Oilers', 'Los Angeles Kings') ORDER BY PKC DESC LIMIT 1
Database: hockey
Question: What is the name of the team that got more wins than loses in the Stanley Cup finals in 1917?
Evidence: more wins than loses refers to W>L; year = 1917;
SQL: SELECT T2.name FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1917' AND T1.W > T1.L
Database: hockey
Question: Please list the teams that have played in 1922's Stanley Cup finals.
Evidence: teams refer to tmID; year = 1922;
SQL: SELECT T2.name FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1922'
Database: hockey
Question: Among the teams that played in 1922's Stanley Cup finals, how many of them had over 20 points in that year?
Evidence: how many teams refer to COUNT(tmID); over 20 points refer to Pts>20; year = 1922;
SQL: SELECT COUNT(T1.tmID) FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1922' AND T2.Pts > 20
Database: hockey
Question: What were the penalty minutes in 1923's Stanley Cup finals of the team that ranked second in that year?
Evidence: teams refer to tmID; year = 1922; ranked second refers to rank = 2; penalty minutes refer to PIM;
SQL: SELECT T1.PIM FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1923' AND T2.rank = 2
Database: hockey
Question: Which team got the most wins in the Stanley Cup finals?
Evidence: team refers name; most wins = MAX(W);
SQL: SELECT T2.name FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year GROUP BY T2.name ORDER BY SUM(T1.W) DESC LIMIT 1
Database: hockey
Question: How many wins did the Philadelphia Flyers have over the Boston Bruins in 1985?
Evidence: Philadelphia Flyers is name of team playing; Boston Bruins is name of opposing team where oppID = 'BOS'; year = 1985; wins refer to W;
SQL: SELECT T1.W FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 1985 AND T1.tmID = ( SELECT DISTINCT tmID FROM Teams WHERE name = 'Philadelphia Flyers' ) AND T1.oppID = ( SELECT DISTINCT tmID FROM Teams WHERE name = 'Boston Bruins' )
Database: hockey
Question: Please list the names of the teams that had a tie in 1909.
Evidence: tie refers to T>0; year = 1909;
SQL: SELECT T2.name, T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.oppID = T3.tmID WHERE T1.year = 1909 AND T1.T = 1
Database: hockey
Question: Please list the first names of the coaches who have taught the Montreal Canadiens.
Evidence: Montreal Canadiens is the name of team.
SQL: SELECT DISTINCT T3.firstName FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Montreal Canadiens'
Database: hockey
Question: How many coaches of the Montreal Canadiens have gotten in the Hall of Fame?
Evidence: have gotten in the Hall of Fame means hofID is not NULL;

Montreal Canadiens is the name of team.
SQL: SELECT COUNT(DISTINCT hofID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Montreal Canadiens'
Database: hockey
Question: Please give the height of the tallest coach of the Montreal Canadiens.
Evidence: the tallest refers to MAX(height); Montreal Canadiens is the name of team;
SQL: SELECT T3.height FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Montreal Canadiens' AND T3.coachID IS NOT NULL ORDER BY T3.height DESC LIMIT 1
Database: hockey
Question: Please list the first names of the coaches whose team played in 1922's Stanley Cup finals.
Evidence: teams refer to tmID; year = 1922;
SQL: SELECT T3.firstName FROM Coaches AS T1 INNER JOIN TeamsSC AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.year = 1922
Database: hockey
Question: Among the coaches who have taught the Philadelphia Flyers, how many of them are born in March?
Evidence: born in March refers to birthMon = 3; Philadelphia Flyers is the name of team;
SQL: SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthMon = 3
Database: hockey
Question: Among the coaches who are born in the USA, how many of them used to train the Philadelphia Flyers?
Evidence: born in the USA refers to birthCountry = 'USA'; Philadelphia Flyers is the name of team;
SQL: SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthCountry = 'USA'
Database: hockey
Question: How many coaches who have taught the Buffalo Sabres have died?
Evidence: have died means deathYear is not NULL; Buffalo Sabres is the name of team;
SQL: SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Buffalo Sabres' AND T3.deathYear IS NOT NULL
Database: hockey
Question: Please list the nick names of the coaches who are from the USA and have taught the Buffalo Sabres.
Evidence: from the USA refers to birthCountry = 'USA'; nick names of the coaches refer to nameNick where coachID is not NULL ; Buffalo Sabres is the name of team;
SQL: SELECT DISTINCT nameNick FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Buffalo Sabres' AND T3.birthCountry = 'USA'
Database: hockey
Question: Among the coaches who taught the teams in 1922's Stanley Cup finals, how many of them are from the USA?
Evidence: from the USA refers to birthCountry = 'USA'; year = 1922;
SQL: SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN TeamsSC AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.year = 1922 AND T3.birthCountry = 'USA'
Database: hockey
Question: In the year 2000, which team has played the most games against the Buffalo Sabres?
Evidence: which team played the most games against refers to oppID where MAX(SUM(G); Buffalo Sabres is the name of team;
SQL: SELECT T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.oppID = T2.tmID INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.tmID = T3.tmID WHERE T1.year = 2000 AND T2.name = 'Buffalo Sabres' GROUP BY T3.name ORDER BY SUM(T2.G) DESC LIMIT 1
Database: hockey
Question: Please list the names of all the teams that have played against the Buffalo Sabres.
Evidence: teams that have played against refer to oppID; Buffalo Sabres is the name of team;
SQL: SELECT DISTINCT T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.oppID = T2.tmID INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.tmID = T3.tmID WHERE T2.name = 'Buffalo Sabres'
Database: hockey
Question: How many penalty minutes did the Montreal Canadiens have in the 1918's Stanley Cup Finals?
Evidence: penalty minutes refer to PIM; year = 1918; Montreal Canadiens is name of team;
SQL: SELECT T2.PIM FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T1.year = 1918
Database: hockey
Question: In the year that the Montreal Canadiens had 24 penalty minutes in the Stanley Cup finals, how many wins did the team had in total?
Evidence: penalty minutes refer to PIM = 24; wins refer to W;
SQL: SELECT T2.W FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T2.PIM = 24
Database: hockey
Question: In which year did the Montreal Canadiens have 49 penalty minutes in the Stanley Cup finals? Was it 1924, 1923 or 1918?
Evidence: penalty minutes refer to PIM = 49;
SQL: SELECT T1.year FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T2.PIM = 49
Database: hockey
Question: Which coach was the first one to teach the Montreal Canadiens, please give his first name.
Evidence: the first one refers to MIN(year);
SQL: SELECT T3.firstName FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Montreal Canadiens' ORDER BY T1.year LIMIT 1
Database: hockey
Question: What is the average winning rate of the Buffalo Sabres in 2000?
Evidence: DIVIDE(SUM(DIVIDE(W,G), COUNT(oppID) where year = 2000; Montreal Canadiens is name of team;
SQL: SELECT SUM(CAST(T2.W AS REAL) / T2.G) / COUNT(T1.oppID) FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID WHERE T2.name = 'Buffalo Sabres' AND T1.year = 2000
Database: hockey
Question: How many penalty minutes did the Montreal Canadiens have on average in the Stanley Cup Finals?
Evidence: AVG(PIM) = DIVIDE(SUM(PIM), COUNT(G)); Montreal Canadiens is name of team;
SQL: SELECT CAST(SUM(T2.PIM) AS REAL) / COUNT(T2.PIM) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens'
Database: hockey
Question: What is the average winning rate of the Montreal Canadiens in the Stanley Cup finals?
Evidence: DIVIDE(SUM(DIVIDE(W,G), COUNT(oppID);
SQL: SELECT SUM(T2.W / T2.G) / SUM(T2.G + T2.W) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens'
Database: hockey
Question: What is the percentage of American coaches among all the coaches who taught the Montreal Canadiens?
Evidence: American refers to birthCountry = 'USA'; DIVIDE(COUNT(coachID where birthCountry = 'USA', name` = 'Montreal Canadiens'), COUNT(coachID where name` = 'Montreal Canadiens')) as percentage;
SQL: SELECT SUM(CAST(T2.W AS REAL) / T2.G) / SUM(T2.G + T2.W) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens'
Database: hockey
Question: Who was the latest non player/builder to become the hall of famer? Give the full name.
Evidence: latest refers to MAX(year); non player/builder refers to category = NOT IN ('player', 'builder');
SQL: SELECT name FROM HOF WHERE category IN ('Player', 'Builder') ORDER BY year DESC LIMIT 1
Database: hockey
Question: For all the referees, who became a hall of famer in the 1970s? What's his hofID?
Evidence: 1970s refers to year between 1970 and 1979; referees stand for category;
SQL: SELECT name, hofID FROM HOF WHERE category = 'Builder' AND year BETWEEN 1970 AND 1979
Database: hockey
Question: In the year 1958, what is the total number of players that became hall of famers?
Evidence: hall of famers refers to hofID; players stand for category;
SQL: SELECT COUNT(hofID) FROM HOF WHERE category = 'Player' AND year = 1958
Database: hockey
Question: How many hall of famers both played and coached in the league?
Evidence: hall of famers refers to hofID; both played and coached means playerID is not NULL and coachID is not NULL;
SQL: SELECT COUNT(playerID) FROM Master WHERE hofID IS NOT NULL AND playerID IS NOT NULL AND coachID IS NOT NULL
Database: hockey
Question: What is the number of players whose last name is Green that played in the league but not coached?
Evidence: played in the league but not coached means playerID is not NULL and coachID is NULL;
SQL: SELECT COUNT(playerID) FROM Master WHERE lastName = 'Green' AND coachID IS NULL
Database: hockey
Question: For the team that Scotty Bowman coached in 1982, how many bench minor penalties did they have that year?
Evidence: bench minor penalties refer to BenchMinor; Scotty Bowman is a coach; year = 1982;
SQL: SELECT T2.BenchMinor FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T3.firstName = 'Scotty' AND T3.lastName = 'Bowman' AND T1.year = 1982
Database: hockey
Question: Among the players who had 10 empty net goals in their career, who is the tallest? Show his full name.
Evidence: 10 empty net goals refer to ENG = 10; tallest refers to MAX(height);
SQL: SELECT T2.firstName, T2.lastName FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.ENG = 10 ORDER BY T2.height DESC LIMIT 1
Database: hockey
Question: Which was the dominant hand for the goaltender who played 32 games for QUN in 1973? Give the full name.
Evidence: the dominant hand refers to shootCatch; year = 1973; tmID = 'QUN'; played 32 games refers to GP = 32;
SQL: SELECT T2.shootCatch, T2.firstName, T2.lastName FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID AND T1.year = 1973 WHERE T1.tmID = 'QUN' AND T1.GP = 32
Database: hockey
Question: For the goalie whose last name is "Young", how many teams did he play in?
Evidence: goalie is a players; teams refer to tmID;
SQL: SELECT COUNT(DISTINCT T1.tmID) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.lastName = 'Young'
Database: hockey
Question: For the goalkeeper that became a coach than a Hall of Famer, who played for BOS in 1972?
Evidence: BOS refers to tmID = 'BOS'; year = 1972; became a coach than a Hall of Famer means coachID is not NULL and hofID is NULL;
SQL: SELECT T2.firstName, T2.lastName , IIF(T1.tmID = 'BOS', 'YES', 'NO') FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 1972 AND T1.tmID = 'BOS' AND T2.coachID IS NOT NULL AND T2.hofID IS NULL
Database: hockey
Question: For the goalie whose legendsID is "P196402" , how many games did he play in the league?
SQL: SELECT SUM(T1.GP) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.legendsID = 'P196402'
Database: hockey
Question: In the history of all the Quebec Bulldogs, which goalie had the most play minutes for the team? Give the full name.
Evidence: the most play minutes refer to MAX(Min); goalie refers to pos = 'G'; New York Islanders is the nameof team;
SQL: SELECT T2.firstName, T2.lastName FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T1.tmID = T3.tmID AND T1.year = T3.year WHERE T3.name = 'Quebec Bulldogs' AND T2.pos = 'D' GROUP BY T1.playerID, T2.firstName, T2.lastName ORDER BY SUM(T1.Min) DESC LIMIT 1
Database: hockey
Question: How many goalies played for Calgary Flames?
Evidence: Calgary Flames is the name of team;
SQL: SELECT COUNT(DISTINCT playerID) FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.name = 'Calgary Flames'
Database: hockey
Question: Which Minnesota North Stars' goalkeeper had the most Goal Againsts in his play time?
Evidence: Goals Against are the number of goals recorded while the goalie is on the ice; the most Goal Againsts refers to MAX(GA); Minnesota North Stars is name of team;
SQL: SELECT playerID FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.name = 'Minnesota North Stars' GROUP BY T1.playerID ORDER BY SUM(T1.GA) DESC LIMIT 1
Database: hockey
Question: How many Haileybury Hockey Club goalies became a hall of famer?
Evidence: hall of famers refers to hofID where playerID is not NULL;
SQL: SELECT COUNT(DISTINCT T1.playerID) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T1.tmID = T3.tmID AND T1.year = T3.year WHERE T3.name = 'Haileybury Hockey Club' AND T2.hofID IS NOT NULL
Database: hockey
Question: For the goalie who had the most shutouts in 2010, what's his catching hand?
Evidence: the most shutouts refer to MAX(SHO); catching hand refers to shootCatch; year = 2010;
SQL: SELECT T2.shootCatch FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 2010 GROUP BY T2.shootCatch ORDER BY SUM(T1.SHO) DESC LIMIT 1
Database: hockey
Question: What's the decrease rate of the game plays did David Aebischer after he got traded in 2005?
Evidence: DIVIDE(SUBTRACT(SUM(GP(year = 2005), SUM(GP(year = 2006)), SUM(GP(year = 2005)) as percentage;
SQL: SELECT CAST((SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) - SUM(CASE WHEN T1.year = 2006 THEN T1.GP ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.firstName = 'David' AND T2.lastName = 'Aebischer'
Database: hockey
Question: State the player ID and coach ID of person who have become coach after retirement.
Evidence: after retirement means playerID Iis not NULL and coachID is not NULL;
SQL: SELECT playerID, coachID FROM Master WHERE playerID IS NOT NULL AND coachID IS NOT NULL
Database: hockey
Question: State the player ID of player with average height of 75.
Evidence: average height of 75 refers to AVG(height) = 75;
SQL: SELECT DISTINCT playerID FROM Master GROUP BY playerID HAVING AVG(height) = 75
Database: hockey
Question: Who is the heaviest player? State player ID of 5 heaviest players.
Evidence: 5 heaviest players refer to MAX(weight) limit to 5 playerID;
SQL: SELECT playerID FROM Master ORDER BY weight DESC LIMIT 5
Database: hockey
Question: What is the full name of players origin from Finland?
Evidence: origin from Finland refers to birthCountry = 'Finland';
SQL: SELECT DISTINCT firstName, lastName FROM Master WHERE birthCountry = 'Finland'
Database: hockey
Question: List down player ID of players who have passed away.
Evidence: passed away means deathYear is not NULL;
SQL: SELECT DISTINCT playerID FROM Master WHERE deathYear IS NOT NULL AND playerID IS NOT NULL
Database: hockey
Question: List down the first name of coaches who still coach after year 2000.
Evidence: after year 2000 refers to year>2000;
SQL: SELECT DISTINCT T1.firstName FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year > 2000
Database: hockey
Question: What is the height and weight for coaches who have won awards in 1930?
Evidence: year = 1930;
SQL: SELECT T1.height, T1.weight FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = '1930'
Database: hockey
Question: How much is the total goals for player with player ID aaltoan01 and how old is this person?
Evidence: total goals refer to SUM(G); how old = SUBTRACT(YEAR(CURDATE, birthYear);
SQL: SELECT SUM(T2.G), STRFTIME('%Y', CURRENT_TIMESTAMP) - T1.birthyear FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T1.playerID = 'aaltoan01' GROUP BY T1.birthyear
Database: hockey
Question: Is there any coach who has not been a player before but has won award? State the ID.
Evidence: coach who has not been a player means playerID is NULL and coachID is not NULL;
SQL: SELECT DISTINCT T2.coachID FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.playerID IS NULL
Database: hockey
Question: Which player ID are left winger and weight more than 200?
Evidence: left winger refers to pos = 'L'; weight>200
SQL: SELECT DISTINCT playerID FROM Master WHERE pos LIKE '%L%' AND weight > 200 AND playerID IS NOT NULL AND pos = 'L'
Database: hockey
Question: What is the total number of game played for players from USA?
Evidence: game played refers to GP; from USA refers to birthCountry = 'USA';
SQL: SELECT COUNT(T2.GP) FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCountry = 'USA'
Database: hockey
Question: Calculate the total points scored by team ID ANA and list down the coashes of the team.
Evidence: points scored refers to Pts; team ID refers to tmID;
SQL: SELECT SUM(T2.Pts), T1.coachID FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T2.tmID = T1.tmID WHERE T2.tmID = 'ANA' GROUP BY T1.coachID
Database: hockey
Question: In 1976, how many goals achieved by team 'BIR' in Division 'EW'?
Evidence: year = 1976; BIR refers to tmID; Division 'EW' refers to divID = 'EW'; goals = G;
SQL: SELECT SUM(T2.G) FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.divID = 'EW' AND T1.tmID = 'BIR' AND T1.year = 1976
Database: hockey
Question: In 2010, how many loses made by team 'BOS' and how many assists were made by the players?
Evidence: year = 2010; BOS refers to tmID; loses refer to L; assists refer to A;
SQL: SELECT SUM(T1.L), SUM(T2.A) FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.tmID = 'BOS' AND T1.year = 2010
Database: hockey
Question: What are the total weights of players for team 'ANA' as per year 1997?
Evidence: ANA refers to tmID;
SQL: SELECT SUM(T1.weight) FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1997 AND T2.tmID = 'ANA'
Database: hockey
Question: Who is the shortest player and state the team ID of that player from 1925 to 1936.
Evidence: Shortest refers to MIN(height); from 1925 to 1936 refers to year between 1925 and 1936;
SQL: SELECT T2.playerID, T2.tmID FROM ( SELECT playerID FROM Master WHERE height IS NOT NULL ORDER BY height ASC LIMIT 1 ) AS T1 INNER JOIN ( SELECT DISTINCT playerID, tmID FROM Scoring WHERE year BETWEEN 1925 AND 1936 ) AS T2 ON T1.playerID = T2.playerID
Database: hockey
Question: Which team has the highest winning rate in year 2000? State the team ID and list down the birth country of it's players.
Evidence: MAX(DIVIDE(COUNT(W), SUM(COUNT(W), (COUNT (L)) where year = 2000;
SQL: SELECT DISTINCT T3.tmID, T1.birthCountry FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID INNER JOIN ( SELECT year, tmID FROM Teams WHERE year = 2000 ORDER BY W / (W + L) DESC LIMIT 1 ) AS T3 ON T2.tmID = T3.tmID AND T2.year = T3.year
Database: hockey
Question: In 1998, How many wins were made by team 'CAR' per game played? Who contributed the most goals? State the player ID.
Evidence: year = 1998; wins per game played = DIVIDE(W, G); CAR refers to tmID; contributed the most goals refers to MAX(G);
SQL: SELECT CAST(T1.W AS REAL) / T1.G, T2.playerID FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.tmID = 'CAR' AND T1.year = 1998 GROUP BY T1.W / T1.G, T2.playerID ORDER BY SUM(T2.G) DESC LIMIT 1
Database: world
Question: Which country has the shortest life expectancy?
Evidence: shortest life expectancy refers to MIN(LifeExpectancy);
SQL: SELECT Name FROM Country ORDER BY LifeExpectancy LIMIT 1