Chinastark/bird_dataset huggingface dataset:
Database: ice_hockey_draft
Note: average = aVg(weight_in_lbs); weight in pounds refers to weight_in_lbs; players refers to playername; highest prospects for the draft refers to MaX(css_rank);
Question: What is the average weight in pounds of all the players with the highest prospects for the draft?
SQL: SELECT cast(sum(weight_info.weight_in_lbs) AS REAL) / count(playerinfo.eliteid) FROM playerinfo INNER JOIN weight_info ON playerinfo.weight = weight_info.weight_id WHERE playerinfo.css_rank = ( SELECT max(css_rank) FROM playerinfo )
Database: ice_hockey_draft
Note: playoffs refers to gametype = 'playoffs'; percentage = MULTIpLY(DIVIDE(SUM(gp > 20), COUNT(eliteid)), 100); played over 20 games refers to gp > 20; 2007-2008 season refers to season = '2007-2008';
Question: Among all the teams that made the playoffs in the 2007-2008 season, identify the percentage that played over 20 games.
SQL: SELECT cast(count(CASE WHEN gp > 20 THEN team ELSE NULL END) AS REAL) * 100 / count(team) FROM seasonstatus WHERE season = '2007-2008' AND gametype = 'Playoffs'
Database: ice_hockey_draft
Note: name of the player refers to playername; scored the most goals in a single game refers to MaX(g); WHL refers to league = 'WHL'; 2007-2008 season refers to season = '2007-2008';
Question: Name the player who scored the most goals in a single game in the 2007-2008 season of WHL?
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2007-2008' AND seasonstatus.league = 'WHL' ORDER BY seasonstatus.g DESC LIMIT 1
Database: ice_hockey_draft
Note: name of the player refers to playername; Chilliwack Chiefs refers to team = 'Chilliwack Chiefs'; scored 100 points or more in the NHL refers to p > 100;
Question: Name the Chilliwack Chiefs players who have scored 100 points or more in the NHL.
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.team = 'Chilliwack Chiefs' AND seasonstatus.p >= 100
Database: ice_hockey_draft
Note: players refers to playername; weigh 120 kg refers to weight_in_kg = 120;
Question: Identify the players who weigh 120 kg.
SQL: SELECT playerinfo.playername FROM weight_info INNER JOIN playerinfo ON weight_info.weight_id = playerinfo.weight WHERE weight_info.weight_in_kg = 120
Database: ice_hockey_draft
Note: players refers to playername; height refers to height_in_cm;
Question: Identify the players with the same height as Brian Gionta. How tall are they?
SQL: SELECT playerinfo.playername, height_info.height_in_cm FROM height_info INNER JOIN playerinfo ON height_info.height_id = playerinfo.height WHERE playerinfo.height = ( SELECT height FROM playerinfo WHERE playername = 'Brian Gionta' )
Database: ice_hockey_draft
Note: name of the player refers to playername; position of the player refers to position_info; committed the most rule violations refers to MaX(pim);
Question: Identify the name and position of the player who has committed the most rule violations.
SQL: SELECT playerinfo.playername, playerinfo.position_info FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.pim = ( SELECT max(pim) FROM seasonstatus )
Database: ice_hockey_draft
Note: name of the player refers to playername; most NHL points in draft year refers to MaX(p);
Question: Name the player who has the most NHL points in draft year.
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.p = ( SELECT max(p) FROM seasonstatus )
Database: ice_hockey_draft
Note: players refers to playername; drafted by the Toronto Maple Leafs refers to overallby = 'Toronto Maple Leafs'; percentage = MULTIpLY(DIVIDE(SUM(nation = 'Eastern Europe'), COUNT(eliteid) WHERE overallby = 'Toronto Maple Leafs'), 100); from Eastern Europe refers to nation in ('Belarus', 'Bulgaria', 'Czech Republic', 'Hungary', 'Moldova', 'poland', 'Romania', 'Slovakia', 'Ukraine'); countries in a continent can be identified by referring to https://worldpopulationreview.com/country-rankings/list-of-countries-by-continent;
Question: Among all players drafted by the Toronto Maple Leafs, identify the percentage who are from Eastern Europe.
SQL: SELECT cast(count(CASE WHEN nation IN ('Belarus', 'Czech Rep.', 'Slovakia', 'Ukraine') THEN eliteid ELSE NULL END) AS REAL) * 100 / count(eliteid) FROM playerinfo WHERE overallby = 'Toronto Maple Leafs'
Database: ice_hockey_draft
Note: players refers to playername; drafted by the Toronto Maple Leafs refers to overallby = 'Toronto Maple Leafs'; highest prospects for the draft refers to MaX(css_rank);
Question: Among all players drafted by the Toronto Maple Leafs in 2008, identify the player with the highest prospects for the draft.
SQL: SELECT playername FROM playerinfo WHERE overallby = 'Toronto Maple Leafs' AND draftyear = '2008' ORDER BY css_rank DESC LIMIT 1
Database: ice_hockey_draft
Note: name of the player refers to playername; playoffs refers to gametype = 'playoffs'; highest points refers to MaX(p); 2006-2007 season refers to season = '2006-2007'; SuperElit league refers to league = 'SuperElit';
Question: Name the player and his team who made the playoffs in the 2006-2007 season of SuperElit league with the highest points.
SQL: SELECT playerinfo.playername, seasonstatus.team FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2006-2007' AND seasonstatus.gametype = 'Playoffs' AND seasonstatus.league = 'SuperElit' ORDER BY seasonstatus.p DESC LIMIT 1
Database: ice_hockey_draft
Note: drafted by the Toronto Maple Leafs refers to overallby = 'Toronto Maple Leafs'; played over 300 games in their first 7 years of the NHL career refers to sum_7yr_gp > 300;
Question: How many players who were drafted by the Toronto Maple Leafs have played over 300 games in their first 7 years of the NHL career?
SQL: SELECT count(eliteid) FROM playerinfo WHERE overallby = 'Toronto Maple Leafs' AND sum_7yr_gp > 300
Database: ice_hockey_draft
Note: how tall refers to height_in_cm; Yale University refers to team = 'Yale Univ.'; 28 penalty minutes refers to pim = '28'; 2005-2006 season refers to season = '2005-2006';
Question: How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season?
SQL: SELECT height_info.height_in_cm FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid INNER JOIN height_info ON playerinfo.height = height_info.height_id WHERE seasonstatus.season = '2005-2006' AND seasonstatus.team = 'Yale Univ.' AND seasonstatus.pim = 28
Database: ice_hockey_draft
Note: goals scored refers to g; Calgary Hitmen refers to team = 'Calgary Hitmen'; percentage = MULTIpLY(DIVIDE(SUM(g WHERE playername = 'Ian Schultz'), SUM(g)), 100); 2007-2008 season refers to season = '2007-2008';
Question: Among all goals scored by Calgary Hitmen in the 2007-2008 season, identify the percentage scored by Ian Schultz.
SQL: SELECT cast(sum(CASE WHEN playerinfo.playername = 'Ian Schultz' THEN seasonstatus.g ELSE 0 END) AS REAL) * 100 / sum(seasonstatus.g) FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2007-2008' AND seasonstatus.team = 'Calgary Hitmen'
Database: ice_hockey_draft
Note: penalty minutes refers to pim; ak Bars Kazan refers to team = 'ak Bars Kazan'; percentage = MULTIpLY(DIVIDE(SUM(pim WHERE playername = 'Yevgeni Muratov'), SUM(pim)), 100.0); 1999-2000 season refers to season = '1999-2000';
Question: Among all penalty minutes picked up by Ak Bars Kazan in the 1999-2000 season, identify the percentage picked up by Yevgeni Muratov.
SQL: SELECT cast(sum(CASE WHEN playerinfo.playername = 'Yevgeni Muratov' THEN seasonstatus.pim ELSE 0 END) AS REAL) * 100 / sum(seasonstatus.pim) FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '1999-2000' AND seasonstatus.team = 'Ak Bars Kazan'
Database: ice_hockey_draft
Note: FaLSE;
Question: What is the birthplace of Aaron Gagnon?
SQL: SELECT birthplace FROM playerinfo WHERE playername = 'Aaron Gagnon'
Database: ice_hockey_draft
Note: FaLSE;
Question: What is the weight in kg of Tony Martensson?
SQL: SELECT weight_info.weight_in_kg FROM playerinfo INNER JOIN weight_info ON playerinfo.weight = weight_info.weight_id WHERE playerinfo.playername = 'Tony Martensson'
Database: ice_hockey_draft
Note: name of players refers to playername; weight 190 lbs refers to weight_in_lbs = 190;
Question: List out the name of players who weight 190 lbs.
SQL: SELECT playerinfo.playername FROM playerinfo INNER JOIN weight_info ON playerinfo.weight = weight_info.weight_id WHERE weight_info.weight_in_lbs = 190
Database: ice_hockey_draft
Note: who refers to playername; heaviest weight refers to MaX(weight_in_kg);
Question: Who has the heaviest weight?
SQL: SELECT playerinfo.playername FROM playerinfo INNER JOIN weight_info ON playerinfo.weight = weight_info.weight_id ORDER BY weight_info.weight_in_kg DESC LIMIT 1
Database: ice_hockey_draft
Note: percentage = MULTIpLY(DIVIDE(SUM(weight_in_lbs > 154 and nation = 'Denmark'), COUNT(eliteid)), 100); players refers to playername; born in Denmark refers to nation = 'Denmark'; weight above 154 lbs refers to weight_in_lbs > 154;
Question: What is the percentage of players who were born in Denmark and weight above 154 lbs?
SQL: SELECT cast(count(CASE WHEN playerinfo.nation = 'Denmark' AND weight_info.weight_in_lbs > 154 THEN playerinfo.eliteid ELSE NULL END) AS REAL) * 100 / count(playerinfo.eliteid) FROM playerinfo INNER JOIN weight_info ON playerinfo.weight = weight_info.weight_id
Database: ice_hockey_draft
Note: FaLSE;
Question: Which team does Andreas Jamtin belong to?
SQL: SELECT DISTINCT seasonstatus.team FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE playerinfo.playername = 'Andreas Jamtin'
Database: ice_hockey_draft
Note: FaLSE;
Question: List out the seasons that Niklas Eckerblom played.
SQL: SELECT DISTINCT seasonstatus.season FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE playerinfo.playername = 'Niklas Eckerblom'
Database: ice_hockey_draft
Note: type of game refers to gametype;
Question: Mention the type of game that Matthias Trattnig played.
SQL: SELECT DISTINCT seasonstatus.gametype FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE playerinfo.playername = 'Matthias Trattnig'
Database: ice_hockey_draft
Note: players refers to playername; 1997-1998 season refers to season = '1997-1998';
Question: List out the nation of players who played for the 1997-1998 season .
SQL: SELECT DISTINCT playerinfo.nation FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '1997-1998'
Database: ice_hockey_draft
Note: highest point in the draft year refers to MaX(p);
Question: What is the highest point highest point of Per Mars in the draft year?
SQL: SELECT seasonstatus.p FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE playerinfo.playername = 'Per Mars' ORDER BY seasonstatus.p DESC LIMIT 1
Database: ice_hockey_draft
Note: Italian refers to nation = 'Italy'; players refers to playername; shortest height refers to MIN(height_in_cm);
Question: Among the Italian players, who has the shortest height?
SQL: SELECT playerinfo.playername FROM height_info INNER JOIN playerinfo ON height_info.height_id = playerinfo.height WHERE playerinfo.nation = 'Italy' ORDER BY height_info.height_in_cm ASC LIMIT 1
Database: ice_hockey_draft
Note: name of players refers to playername; height of 5'8" refers to height_in_inch = '5''8"';
Question: List out the name of players who have a height of 5'8".
SQL: SELECT playerinfo.playername FROM height_info INNER JOIN playerinfo ON height_info.height_id = playerinfo.height WHERE height_info.height_in_inch = '5''8"'
Database: ice_hockey_draft
Note: born in 1982 refers to birthyear = 1982; height above 182cm refers to height_in_cm > 182 ;
Question: How many players were born in 1982 and have a height above 182cm?
SQL: SELECT count(playerinfo.eliteid) FROM height_info INNER JOIN playerinfo ON height_info.height_id = playerinfo.height WHERE height_info.height_in_cm > 182 AND strftime('%Y', playerinfo.birthdate) = '1982'
Database: ice_hockey_draft
Note: percentage = MULTIpLY(DIVIDE(SUM(nation = 'Russia' WHERE height_in_cm < 200), COUNT(eliteid)), 100); Russian refers to nation = 'Russia'; players refers to playername; height of under 200 inch refers to height_in_cm < 200;
Question: What is the percentage of Russian players who have a height of under 200 inch?
SQL: SELECT cast(count(CASE WHEN height_info.height_in_cm < 200 AND playerinfo.nation = 'Russia' THEN playerinfo.eliteid ELSE NULL END) AS REAL) * 100 / count(playerinfo.eliteid) FROM height_info INNER JOIN playerinfo ON height_info.height_id = playerinfo.height
Database: ice_hockey_draft
Note: USa refers to nation = 'USa' ; players refers to playername; lightest weight refers to MIN(weight_in_lbs);
Question: Among the USA players, who has the lightest weight?
SQL: SELECT playerinfo.playername FROM weight_info INNER JOIN playerinfo ON weight_info.weight_id = playerinfo.weight WHERE playerinfo.nation = 'USA' ORDER BY weight_info.weight_in_lbs ASC LIMIT 1
Database: ice_hockey_draft
Note: committed the highest rule violations or penalty minutes refers to MaX(pim); 2000-2001 season refers to season = '2000-2001';
Question: Who among the players in season 2000-2001 has committed the highest rule violations or penalty minutes?
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2000-2001' ORDER BY seasonstatus.pim DESC LIMIT 1
Database: ice_hockey_draft
Note: names of the players refers to playername; team avangard Omsk refers to team = 'avangard Omsk'; 2000-2001 season refers to season = '2000-2001';
Question: List the names of all players in team Avangard Omsk in season 2000-2001.
SQL: SELECT DISTINCT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2000-2001' AND seasonstatus.team = 'Avangard Omsk'
Database: ice_hockey_draft
Note: who refers to playername; drafted by arizona Coyotes refers to overallby = 'arizona Coyotes'; committed the highest rule violations refers to MaX(pim); in 2000 refers to draftyear = 2000;
Question: Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations?
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE playerinfo.overallby = 'Arizona Coyotes' AND playerinfo.draftyear = 2000 ORDER BY seasonstatus.pim DESC LIMIT 1
Database: ice_hockey_draft
Note: drafted by arizona Coyotes refers to overallby = 'arizona Coyotes'; height reaches 195 centimeters refers to height_in_cm = 195;
Question: How many players were drafted by Arizona Coyotes whose height reaches 195 centimeters?
SQL: SELECT count(playerinfo.eliteid) FROM height_info INNER JOIN playerinfo ON height_info.height_id = playerinfo.height WHERE playerinfo.overallby = 'Arizona Coyotes' AND height_info.height_in_cm = 195
Database: ice_hockey_draft
Note: names of the players refers to playername; avangard Omsk refers to team = 'avangard Omsk'; playoffs refers to gametype = 'playoffs'; 2000-2001 season refers to season = '2000-2001';
Question: List the names of all players from Avangard Omsk that have played for playoffs in season 2000-2001.
SQL: SELECT DISTINCT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2000-2001' AND seasonstatus.team = 'Avangard Omsk' AND seasonstatus.gametype = 'Playoffs'
Database: ice_hockey_draft
Note: most valuable player refers to MaX(p); 2000-2001 season refers to season = '2000-2001'; International league refers to league = 'International';
Question: Who is the most valuable player who played in the 2000-2001 season of the International league?
SQL: SELECT DISTINCT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2000-2001' AND seasonstatus.league = 'International' ORDER BY seasonstatus.p DESC LIMIT 1
Database: ice_hockey_draft
Note: born in 1980 refers to birthyear = 1980; weigh 185 in pounds refers to weight_in_lbs = 185;
Question: How many players who were born in 1980 weigh 185 in pounds?
SQL: SELECT count(playerinfo.eliteid) FROM weight_info INNER JOIN playerinfo ON weight_info.weight_id = playerinfo.weight WHERE weight_info.weight_in_lbs = 185 AND strftime('%Y', playerinfo.birthdate) = '1980'
Database: ice_hockey_draft
Note: played the most game plays refers to MaX(gp); 2000-2001 season refers to season = '2000-2001'; International league refers to league = 'International';
Question: Who has played the most game plays in the 2000-2001 season of the International league?
SQL: SELECT DISTINCT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2000-2001' AND seasonstatus.league = 'International' ORDER BY seasonstatus.gp DESC LIMIT 1
Database: ice_hockey_draft
Note: names of the players refers to playername; avangard Omsk refers to team = 'avangard Omsk'; International league refers to league = 'International'; no goals in draft year refers to g = 0; 2000-2001 season refers to season = '2000-2001';
Question: List the names of all players from Avangard Omsk who played in the 2000-2001 season of the International league that have no goals in draft year.
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2000-2001' AND seasonstatus.league = 'International' AND seasonstatus.team = 'Czech Republic (all)' AND seasonstatus.g = 0
Database: ice_hockey_draft
Note: oldest player refers to MIN(birthdate); avangard Omsk refers to team = 'avangard Omsk'; regular season refers to gametype = 'Regular season'; 2000-2001 season refers to season = '2000-2001';
Question: Who is the oldest player who played for Avangard Omsk during the regular season in 2000-2001?
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2000-2001' AND seasonstatus.gametype = 'Regular Season' AND seasonstatus.team = 'Avangard Omsk' ORDER BY playerinfo.birthdate ASC LIMIT 1
Database: ice_hockey_draft
Note: OHL league refers to league = 'OHL'; who refers to playername; regular season refers to gametype = 'Regular season'; most number of assist refers to MaX(a); 2007-2008 season refers to season = '2007-2008';
Question: Among the players who played in OHL league during the regular season in 2007-2008, who is the player that attained the most number of assist?
SQL: SELECT playerinfo.playername FROM seasonstatus INNER JOIN playerinfo ON seasonstatus.eliteid = playerinfo.eliteid WHERE seasonstatus.season = '2007-2008' AND seasonstatus.league = 'OHL' AND seasonstatus.gametype = 'Regular Season' ORDER BY seasonstatus.a DESC LIMIT 1
Database: ice_hockey_draft
Note: heaviest player refers to MaX(weight_in_lb); drafted by arizona Coyotes refers to overallby = 'arizona Coyotes';
Question: How many teams did the heaviest player drafted by Arizona Coyotes have played for?
SQL: SELECT count(seasonstatus.team) FROM playerinfo INNER JOIN seasonstatus ON playerinfo.eliteid = seasonstatus.eliteid INNER JOIN weight_info ON playerinfo.weight = weight_info.weight_id WHERE playerinfo.overallby = 'Arizona Coyotes' ORDER BY weight_info.weight_in_lbs DESC LIMIT 1
Database: ice_hockey_draft
Note: average weight in pounds = aVg(weight_in_lbs); weight in pounds refers to weight_in_lbs; players refers to playername; drafted by arizona Coyotes refers to overallby = 'arizona Coyotes';
Question: Calculate the average weight in pounds of all players drafted by Arizona Coyotes.
SQL: SELECT cast(sum(weight_info.weight_in_lbs) AS REAL) / count(playerinfo.eliteid) FROM weight_info INNER JOIN playerinfo ON weight_info.weight_id = playerinfo.weight WHERE playerinfo.overallby = 'Arizona Coyotes'
Database: ice_hockey_draft
Note: average height in centimeter = aVg(height_in_cm); height in centimeter refers to height_in_cm; players refers to playername; acadie-Bathurst Titan refers to team = 'acadie-Bathurst Titan'; regular season refers to gametype = 'Regular season';
Question: Calculate the average height in centimeter of all players who played in Acadie-Bathurst Titan during regular season.
SQL: SELECT cast(sum(height_info.height_in_cm) AS REAL) / count(playerinfo.eliteid) FROM height_info INNER JOIN playerinfo ON height_info.height_id = playerinfo.height INNER JOIN seasonstatus ON playerinfo.eliteid = seasonstatus.eliteid WHERE seasonstatus.team = 'Acadie-Bathurst Titan' AND seasonstatus.gametype = 'Regular Season'
Database: ice_hockey_draft
Note: 1997-1998 season refers to season = '1997-1998';
Question: How many games did Per Mars play in the 1997-1998 season?
SQL: SELECT seasonstatus.gp FROM playerinfo INNER JOIN seasonstatus ON playerinfo.eliteid = seasonstatus.eliteid WHERE seasonstatus.season = '1997-1998' AND playerinfo.playername = 'Pavel Patera'
Database: ice_hockey_draft
Note: how heavy in kilograms refers to weight_in_kg;
Question: How heavy is Matthias Trattnig in kilograms?
SQL: SELECT weight_info.weight_in_kg FROM playerinfo INNER JOIN weight_info ON playerinfo.weight = weight_info.weight_id WHERE playerinfo.playername = 'Pavel Patera'
Database: ice_hockey_draft
Note: names of players refers to playername; height over 5'9 refers to height_in_inch > '5''9"';
Question: List the name of players who have a height over 5'9.
SQL: SELECT playerinfo.playername FROM playerinfo INNER JOIN height_info ON playerinfo.height = height_info.height_id WHERE height_info.height_in_inch > '5''9"'
Database: ice_hockey_draft
Note: 1997-1998 season refers to season = '1997-1998';
Question: What team did Niklas Eckerblom play in the 1997-1998 season?
SQL: SELECT seasonstatus.team FROM playerinfo INNER JOIN seasonstatus ON playerinfo.eliteid = seasonstatus.eliteid WHERE seasonstatus.season = '1997-1998' AND playerinfo.playername = 'Niko Kapanen'
Database: ice_hockey_draft
Note: Swedish refers to nation = 'Sweden'; team with the most Swedish refers to MaX(team WHERE nation = 'Sweden');
Question: Which team has the most Swedish?
SQL: SELECT t.team FROM ( SELECT seasonstatus.team, count(DISTINCT playerinfo.eliteid) FROM playerinfo INNER JOIN seasonstatus ON playerinfo.eliteid = seasonstatus.eliteid WHERE playerinfo.nation = 'Sweden' GROUP BY seasonstatus.team ORDER BY count(DISTINCT playerinfo.eliteid) DESC LIMIT 1 ) AS t
Database: ice_hockey_draft
Note: playoffs refers to gametype = 'playoffs';
Question: How many playoffs did Per Mars participate in?
SQL: SELECT sum(seasonstatus.gp) FROM playerinfo INNER JOIN seasonstatus ON playerinfo.eliteid = seasonstatus.eliteid WHERE playerinfo.playername = 'Per Mars' AND seasonstatus.gametype = 'Playoffs'
Database: ice_hockey_draft
Note: name of the player refers to playername; most goals refers to MaX(g); team Rimouski Oceanic refers to team = 'Rimouski Oceanic'; playoff refers to gametype = 'playoffs';
Question: Name the player who had the most goals for team Rimouski Oceanic in playoff.
SQL: SELECT playerinfo.playername FROM playerinfo INNER JOIN seasonstatus ON playerinfo.eliteid = seasonstatus.eliteid WHERE seasonstatus.team = 'Rimouski Oceanic' AND seasonstatus.gametype = 'Playoffs' ORDER BY seasonstatus.g DESC LIMIT 1