db_id stringclasses 69 values | question stringlengths 24 325 | evidence stringlengths 0 673 | SQL stringlengths 23 804 |
|---|---|---|---|
retails | How many customers in the machinery segment are in debt? | machinery segment refers to c_mktsegment = 'MACHINERY'; in debt refers to c_acctbal < 0 | SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0 AND c_mktsegment = 'MACHINERY' |
retails | How many urgent orders did Clerk#000000001 handle in 1997? | urgent order refers to o_orderpriority = '1-URGENT'; Clerk#000000001 refers to o_clerk = 'Clerk#000000001'; 1997 refers to year(o_orderdate) = 1997 | SELECT COUNT(o_orderkey) FROM orders WHERE STRFTIME('%Y', o_orderdate) = '1997' AND o_clerk = 'Clerk#000000001' AND o_orderpriority = '1-URGENT' |
retails | What is the name of the customer whose order was delivered the longest? | name of the customer refers to c_name; delivered the longest refers to max(subtract(l_receiptdate, l_commitdate)) | SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN customer AS T3 ON T1.o_custkey = T3.c_custkey ORDER BY (JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate)) DESC LIMIT 1 |
retails | How much is the total price of all the orders shipped to customers in Argentina? | total price = sum(o_totalprice); Argentina refers to n_name = 'Argentina' | SELECT SUM(T3.o_totalprice) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey INNER JOIN orders AS T3 ON T1.c_custkey = T3.o_custkey WHERE T2.n_name = 'ARGENTINA' |
retails | How many customers in the building segments have orders with a total price of no less than 50,000? | building segment refers to c_mktsegment = 'BUILDING'; a total price of no less than 50,000 refers to o_totalprice > 50000 | SELECT COUNT(T2.c_name) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'BUILDING' AND T1.o_totalprice > 50000 |
retails | Which country has the least number of suppliers? | country refers to n_name; the least number of suppliers refers to min(count(s_name)) | SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey GROUP BY T1.s_nationkey ORDER BY COUNT(T1.s_name) LIMIT 1 |
retails | How much is the part supply cost for the medium metallic grey dodger linen? | part supply cost refers to ps_supplycost; medium metallic grey dodger linen refers to p_name = 'medium metallic grey dodger linen' | SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'medium metallic grey dodger linen' |
retails | What are the top 2 countries with the highest number of indebted suppliers? | country refers to c_name; highest number of indebted refers to max(sum(acctbal)) where s_acctbal < 0 | SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T1.s_nationkey ) AS T ORDER BY T.num LIMIT 2 |
retails | What are the names of the parts that have a part supply cost of at least 1,000? | name of the part refers to p_name; part supply cost of at least 1,000 refers to ps_supplycost > 1000 | SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost > 1000 |
retails | What is the name of the country of the supplier with the highest debt? | name of the country refers to n_name; the highest debt refers to min(s_acctbal) | SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey ORDER BY T1.s_suppkey DESC LIMIT 1 |
retails | Who is the clerk in charge of handling the item with the highest amount of extended price? | clerk refers to o_clerk; the highest amount of extended price refers to max(l_extendedprice) | SELECT T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T2.l_extendedprice DESC LIMIT 1 |
retails | What are the total quantities of the items ordered by customer 101660 on 10/5/1995? | total quantity refers to sum(l_quantity); customer 101660 refers to o_custkey = 101660; on 10/5/1995 refers to o_orderdate = '1995-10-05' | SELECT SUM(T2.l_quantity) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1995-10-05' AND T1.o_custkey = 101660 |
retails | What is the total amount of tax charged for the order placed by customer 88931 on 7/13/994? | total amount of tax refers to sum(multiply(multiply(l_extendedprice, subtract(1, l_discount)), add(1, l_tax))); customer 88931 refers to o_custkey = 88931; on 7/13/1994 refers to o_orderdate = '1994-07-13' | SELECT SUM(T2.l_extendedprice * (1 - T2.l_discount) * (1 + T2.l_tax)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = 88931 AND T1.o_orderdate = '1994-07-13' |
retails | What are the names of the parts that were ordered by customer 110942? | name of the part refers to p_name; customer 110942 refers to o_custkey = 110942 | SELECT T3.p_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN part AS T3 ON T2.l_partkey = T3.p_partkey WHERE T1.o_custkey = 110942 |
retails | How much is the discounted price of every item that customer 111511 ordered in order 53159? List the names of the parts of every item. | discounted price refers to multiply(l_extendedprice, subtract(1, l_discount)); customer 111511 refers to o_custkey = 111511; order 53159 refers to o_orderkey = 53159; name of the part refers to p_name | SELECT T2.l_extendedprice * (1 - T2.l_discount), T3.p_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN part AS T3 ON T2.l_partkey = T3.p_partkey WHERE T1.o_custkey = 111511 AND T1.o_orderkey = 53159 |
ice_hockey_draft | What is the height of David Bornhammar in inches? | heigh in inches refers to height_in_inch; | SELECT T2.height_in_inch FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar' |
ice_hockey_draft | Please list the names of all the players with a height of over 6'2" inches. | name of the players refers to PlayerName; height of over 6'2" inches refers to height_in_inch > '6''2"' ; | SELECT DISTINCT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2"' |
ice_hockey_draft | Among the players with a height of over 6'2" inches, how many of them were born in Sweden? | height of over 6'2" inches refers to height_in_inch > '6''2"'; born in Sweden refers to nation = 'Sweden' ; | SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2"' AND T1.nation = 'Sweden' |
ice_hockey_draft | What is the name of the tallest player? | tallest player refers to MAX(height_in_cm); | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id ORDER BY T2.height_in_cm DESC LIMIT 1 |
ice_hockey_draft | How much does David Bornhammar weigh in kilograms? | weigh in kilograms refers to weight_in_kg; | SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.PlayerName = 'David Bornhammar' |
ice_hockey_draft | How many players weigh more than 90 kg? | weigh more than 90 kg refers to weight_in_kg > 90; | SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 |
ice_hockey_draft | Among the players that weigh more than 90 kg, how many of them have a position of defense? | weigh more than 90 kg refers to weight_in_kg > 90; position of defense refers to position_info = 'D' ; | SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.position_info = 'D' |
ice_hockey_draft | Among the players that weigh more than 90 kg, what is the name of the player that has the most attendance in the player's first 7 years of NHL career? | weigh more than 90 kg refers to weight_in_kg > 90; name of the player refers to PlayerName; most attendance in the player's first 7 years of NHL career refers to MAX(sum_7yr_GP); | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.sum_7yr_GP = ( SELECT MAX(T1.sum_7yr_GP) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 ) |
ice_hockey_draft | What is the weight of the player with the longest time on ice in the player’s first 7 years of NHL career in kilograms? | weight in kilograms refers to weight_in_kg; longest time on ice in the player's first 7 years of NHL career refers to MAX(sum_7yr_TOI); | SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.sum_7yr_TOI = ( SELECT MAX(t.sum_7yr_TOI) FROM PlayerInfo t ) |
ice_hockey_draft | How much taller is David Bornhammar than Pauli Levokari in centimeters? | how much taller = SUBTRACT(SUM(height_in_cm WHERE PlayerName = 'David Bornhammar'), SUM(height_in_cm WHERE PlayerName = 'Pauli Levokari')); height in centimeters refers to height_in_cm; | SELECT ( SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar' ) - ( SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'Pauli Levokari' ) |
ice_hockey_draft | Among all the players that are right-shooted, how many of them weigh over 90 kg? | right-shooted refers to shoots = 'R'; weigh over 90 kg refers to weight_in_kg > 90; | SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.shoots = 'R' |
ice_hockey_draft | Please list the names of all the players that are over 90 kg and are right-shooted. | names of the players refers to PlayerName; over 90 kg refers to weight_in_kg > 90; right-shooted refers to shoots = 'R'; | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.shoots = 'R' |
ice_hockey_draft | What is the BMI of David Bornhammar? | BMI = DIVIDE(weight_in_kg, power(DIVIDE(height_in_cm, 100), 2)); | SELECT CAST(T2.weight_in_kg AS REAL) / (CAST(T3.height_in_cm AS REAL) / 100 * (CAST(T3.height_in_cm AS REAL) / 100)) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T1.PlayerName = 'David Bornhammar' |
ice_hockey_draft | What is the average height in centimeters of all the players in the position of defense? | average = AVG(height_in_cm); players refers to PlayerName; position of defense refers to position_info = 'D' ; | SELECT CAST(SUM(T2.height_in_cm) AS REAL) / COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.position_info = 'D' |
ice_hockey_draft | What is the weight in pounds of the heaviest player? | weight in pounds refers to weight_in_lbs; heaviest player refers to MAX(weight_in_lbs); | SELECT MAX(T2.weight_in_lbs) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id |
ice_hockey_draft | How many right-shooted players have a height of 5'7''? | right-shooted players refers to shoots = 'R'; height of 5'7'' refers to height_in_inch = '5''7"'; | SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch = '5''7"' AND T1.shoots = 'R' |
ice_hockey_draft | Among the players whose total NHL games played in their first 7 years of NHL career is no less than 500, what is the name of the player who committed the most rule violations? | total NHL games played in their first 7 years of NHL career is no less than 500 refers to sum_7yr_GP > 500; name of the player refers to PlayerName; committed the most rule violations refers to MAX(PIM); | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.sum_7yr_GP > 500 ORDER BY T2.PIM DESC LIMIT 1 |
ice_hockey_draft | What is the height in centimeter of the tallest player born in Edmonton, Alberta, Canada? | height in centimeter refers to height_in_cm; tallest player refers to MAX(height_in_cm); born in Edmonton, Alberta, Canada refers to birthplace = 'Edmonton, AB, CAN'; | SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.birthplace = 'Edmonton, AB, CAN' ORDER BY T2.height_in_cm DESC LIMIT 1 |
ice_hockey_draft | How many players, who were drafted by Anaheim Ducks in 2008, have played for U.S. National U18 Team? | drafted by Anaheim Ducks refers to overallby = 'Anaheim Ducks'; in 2008 refers to draftyear = 2008; played for U.S. National U18 Team refers to TEAM = 'U.S. National U18 Team'; | SELECT COUNT(DISTINCT T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.overallby = 'Anaheim Ducks' AND T1.draftyear = 2008 AND T2.TEAM = 'U.S. National U18 Team' |
ice_hockey_draft | What is the weight in kilograms of the player with the highest number of goal differential of all time? | weight in kilograms refers to weight_in_kg; highest number of goal differential of all time refers to MAX(PLUSMINUS); | SELECT T3.weight_in_kg FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN weight_info AS T3 ON T2.weight = T3.weight_id ORDER BY T1.PLUSMINUS DESC LIMIT 1 |
ice_hockey_draft | Who is the most valuable player in QMJHL league during the 2004-2005 season? | most valuable player refers to MAX(P); QMJHL league refers to LEAGUE = 'QMJHL'; 2004-2005 season refers to SEASON = '2004-2005'; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON BETWEEN '2004' AND '2005' AND T1.LEAGUE = 'QMJHL' ORDER BY T1.P DESC LIMIT 1 |
ice_hockey_draft | What are the names of the players who played for Acadie-Bathurst Titan during the regular season in 1998-1999? | names of the players refers to PlayerName; played for Acadie-Bathurst Titan refers to TEAM = 'AcadieandBathurst Titan'; regular season refers to GAMETYPE = 'Regular Season'; in 1998-1999 refers to SEASON = '1998-1999'; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Regular Season' AND T1.TEAM = 'Acadie-Bathurst Titan' |
ice_hockey_draft | How many games did the tallest player have ever played? | tallest player refers to MAX(height_in_cm); | SELECT T1.GP FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.ELITEID = ( SELECT t.ELITEID FROM PlayerInfo t ORDER BY t.height DESC LIMIT 1 ) |
ice_hockey_draft | Who is the youngest player to have played during the 1997-1998 season for OHL League? | youngest player refers to MAX(birthdate); 1997-1998 season refers to SEASON = '1997-1998'; OHL league refers to LEAGUE = 'OHL'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998' AND T1.LEAGUE = 'OHL' ORDER BY T2.birthdate DESC LIMIT 1 |
ice_hockey_draft | Among the players who played 72 games, how many are left-shooters? | played 72 games refers to GP = 72; left-shooters refers to shoots = 'L'; | SELECT COUNT(T2.ELITEID) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.GP = 72 AND T2.shoots = 'L' |
ice_hockey_draft | What is the difference in the number of goals scored by Pavel Brendl during the regular season versus the playoffs in the 1998-1999 season? | difference = SUBTRACT(SUM(G WHERE GAMETYPE = 'Regular Season'), SUM(G WHERE GAMETYPE = 'Playoffs') WHERE SEASON = '1998-1999'); number of goals scored refers to G; regular season refers to GAMETYPE = 'Regular Season'; playoffs refers to GAMETYPE = 'Playoffs'; 1998-1999 season refers to SEASON = '1998-1999'; | SELECT T3.Rs_G - T4.Pf_G AS diff FROM ( SELECT T2.PlayerName, T1.G AS Rs_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Regular Season' ) AS T3 INNER JOIN ( SELECT T2.PlayerName, T1.G AS Pf_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Playoffs' ) AS T4 ON T3.PlayerName = T4.PlayerName |
ice_hockey_draft | What is the average weight in pounds of all the players with the highest prospects for the draft? | 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); | SELECT CAST(SUM(T2.weight_in_lbs) AS REAL) / COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.CSS_rank = ( SELECT MAX(CSS_rank) FROM PlayerInfo ) |
ice_hockey_draft | Among all the teams that made the playoffs in the 2007-2008 season, identify the percentage that played over 20 games. | 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'; | 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' |
ice_hockey_draft | Name the player who scored the most goals in a single game in the 2007-2008 season of WHL? | 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'; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.LEAGUE = 'WHL' ORDER BY T1.G DESC LIMIT 1 |
ice_hockey_draft | Name the Chilliwack Chiefs players who have scored 100 points or more in the NHL. | 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; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.TEAM = 'Chilliwack Chiefs' AND T1.P >= 100 |
ice_hockey_draft | Identify the players who weigh 120 kg. | players refers to PlayerName; weigh 120 kg refers to weight_in_kg = 120; | SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T1.weight_in_kg = 120 |
ice_hockey_draft | Identify the players with the same height as Brian Gionta. How tall are they? | players refers to PlayerName; height refers to height_in_cm; | SELECT T2.PlayerName, T1.height_in_cm FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.height = ( SELECT height FROM PlayerInfo WHERE PlayerName = 'Brian Gionta' ) |
ice_hockey_draft | Identify the name and position of the player who has committed the most rule violations. | name of the player refers to PlayerName; position of the player refers to position_info; committed the most rule violations refers to MAX(PIM); | SELECT T2.PlayerName, T2.position_info FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.PIM = ( SELECT MAX(PIM) FROM SeasonStatus ) |
ice_hockey_draft | Name the player who has the most NHL points in draft year. | name of the player refers to PlayerName; most NHL points in draft year refers to MAX(P); | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.P = ( SELECT MAX(P) FROM SeasonStatus ) |
ice_hockey_draft | Among all players drafted by the Toronto Maple Leafs, identify the percentage who are from Eastern Europe. | 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; | 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' |
ice_hockey_draft | Among all players drafted by the Toronto Maple Leafs in 2008, identify the player with the highest prospects for the draft. | 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); | SELECT PlayerName FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND draftyear = '2008' ORDER BY CSS_rank DESC LIMIT 1 |
ice_hockey_draft | Name the player and his team who made the playoffs in the 2006-2007 season of SuperElit league with the highest points. | 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'; | SELECT T2.PlayerName, T1.TEAM FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2006-2007' AND T1.GAMETYPE = 'Playoffs' AND T1.LEAGUE = 'SuperElit' ORDER BY T1.P DESC LIMIT 1 |
ice_hockey_draft | 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? | 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; | SELECT COUNT(ELITEID) FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND sum_7yr_GP > 300 |
ice_hockey_draft | How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season? | 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'; | SELECT T3.height_in_cm FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T2.height = T3.height_id WHERE T1.SEASON = '2005-2006' AND T1.TEAM = 'Yale Univ.' AND T1.PIM = 28 |
ice_hockey_draft | Among all goals scored by Calgary Hitmen in the 2007-2008 season, identify the percentage scored by Ian Schultz. | 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'; | SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Ian Schultz' THEN T1.G ELSE 0 END) AS REAL) * 100 / SUM(T1.G) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.TEAM = 'Calgary Hitmen' |
ice_hockey_draft | Among all penalty minutes picked up by Ak Bars Kazan in the 1999-2000 season, identify the percentage picked up by Yevgeni Muratov. | 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'; | SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Yevgeni Muratov' THEN T1.PIM ELSE 0 END) AS REAL) * 100 / SUM(T1.PIM) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1999-2000' AND T1.TEAM = 'Ak Bars Kazan' |
ice_hockey_draft | What is the birthplace of Aaron Gagnon? | FALSE; | SELECT birthplace FROM PlayerInfo WHERE PlayerName = 'Aaron Gagnon' |
ice_hockey_draft | What is the weight in kg of Tony Martensson? | FALSE; | SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.PlayerName = 'Tony Martensson' |
ice_hockey_draft | List out the name of players who weight 190 lbs. | name of players refers to PlayerName; weight 190 lbs refers to weight_in_lbs = 190; | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_lbs = 190 |
ice_hockey_draft | Who has the heaviest weight? | who refers to PlayerName; heaviest weight refers to MAX(weight_in_kg); | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id ORDER BY T2.weight_in_kg DESC LIMIT 1 |
ice_hockey_draft | What is the percentage of players who were born in Denmark and weight above 154 lbs? | 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; | SELECT CAST(COUNT(CASE WHEN T1.nation = 'Denmark' AND T2.weight_in_lbs > 154 THEN T1.ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id |
ice_hockey_draft | Which team does Andreas Jamtin belong to? | FALSE; | SELECT DISTINCT T1.TEAM FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Andreas Jamtin' |
ice_hockey_draft | List out the seasons that Niklas Eckerblom played. | FALSE; | SELECT DISTINCT T1.SEASON FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Niklas Eckerblom' |
ice_hockey_draft | Mention the type of game that Matthias Trattnig played. | type of game refers to GAMETYPE; | SELECT DISTINCT T1.GAMETYPE FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Matthias Trattnig' |
ice_hockey_draft | List out the nation of players who played for the 1997-1998 season . | players refers to PlayerName; 1997-1998 season refers to SEASON = '1997-1998'; | SELECT DISTINCT T2.nation FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998' |
ice_hockey_draft | What is the highest point highest point of Per Mars in the draft year? | highest point in the draft year refers to MAX(P); | SELECT T1.P FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Per Mars' ORDER BY T1.P DESC LIMIT 1 |
ice_hockey_draft | Among the Italian players, who has the shortest height? | Italian refers to nation = 'Italy'; players refers to PlayerName; shortest height refers to MIN(height_in_cm); | SELECT T2.PlayerName FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.nation = 'Italy' ORDER BY T1.height_in_cm ASC LIMIT 1 |
ice_hockey_draft | List out the name of players who have a height of 5'8". | name of players refers to PlayerName; height of 5'8" refers to height_in_inch = '5''8"'; | SELECT T2.PlayerName FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_inch = '5''8"' |
ice_hockey_draft | How many players were born in 1982 and have a height above 182cm? | born in 1982 refers to birthyear = 1982; height above 182cm refers to height_in_cm > 182 ; | SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_cm > 182 AND strftime('%Y', T2.birthdate) = '1982' |
ice_hockey_draft | What is the percentage of Russian players who have a height of under 200 inch? | 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; | SELECT CAST(COUNT(CASE WHEN T1.height_in_cm < 200 AND T2.nation = 'Russia' THEN T2.ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height |
ice_hockey_draft | Among the USA players, who has the lightest weight? | USA refers to nation = 'USA' ; players refers to PlayerName; lightest weight refers to MIN(weight_in_lbs);
| SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.nation = 'USA' ORDER BY T1.weight_in_lbs ASC LIMIT 1 |
ice_hockey_draft | Who among the players in season 2000-2001 has committed the highest rule violations or penalty minutes? | committed the highest rule violations or penalty minutes refers to MAX(PIM); 2000-2001 season refers to SEASON = '2000-2001' | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' ORDER BY T1.PIM DESC LIMIT 1 |
ice_hockey_draft | List the names of all players in team Avangard Omsk in season 2000-2001. | names of the players refers to PlayerName; team Avangard Omsk refers to TEAM = 'Avangard Omsk'; 2000-2001 season refers to SEASON = '2000-2001'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk' |
ice_hockey_draft | Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations? | 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; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.overallby = 'Arizona Coyotes' AND T2.draftyear = 2000 ORDER BY T1.PIM DESC LIMIT 1 |
ice_hockey_draft | How many players were drafted by Arizona Coyotes whose height reaches 195 centimeters? | drafted by Arizona Coyotes refers to overallby = 'Arizona Coyotes'; height reaches 195 centimeters refers to height_in_cm = 195; | SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.overallby = 'Arizona Coyotes' AND T1.height_in_cm = 195 |
ice_hockey_draft | List the names of all players from Avangard Omsk that have played for playoffs in season 2000-2001. | 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'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk' AND T1.GAMETYPE = 'Playoffs' |
ice_hockey_draft | Who is the most valuable player who played in the 2000-2001 season of the International league? | most valuable player refers to MAX(P); 2000-2001 season refers to SEASON = '2000-2001'; International league refers to LEAGUE = 'International'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.LEAGUE = 'International' ORDER BY T1.P DESC LIMIT 1 |
ice_hockey_draft | How many players who were born in 1980 weigh 185 in pounds? | born in 1980 refers to birthyear = 1980; weigh 185 in pounds refers to weight_in_lbs = 185; | SELECT COUNT(T2.ELITEID) FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T1.weight_in_lbs = 185 AND strftime('%Y', T2.birthdate) = '1980' |
ice_hockey_draft | Who has played the most game plays in the 2000-2001 season of the International league? | played the most game plays refers to MAX(GP); 2000-2001 season refers to SEASON = '2000-2001'; International league refers to LEAGUE = 'International'; | SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.LEAGUE = 'International' ORDER BY T1.GP DESC LIMIT 1 |
ice_hockey_draft | 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. | 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'; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.LEAGUE = 'International' AND T1.TEAM = 'Czech Republic (all)' AND T1.G = 0 |
ice_hockey_draft | Who is the oldest player who played for Avangard Omsk during the regular season in 2000-2001? | 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';
| SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.GAMETYPE = 'Regular Season' AND T1.TEAM = 'Avangard Omsk' ORDER BY T2.birthdate ASC LIMIT 1 |
ice_hockey_draft | 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? | 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'; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.LEAGUE = 'OHL' AND T1.GAMETYPE = 'Regular Season' ORDER BY T1.A DESC LIMIT 1 |
ice_hockey_draft | How many teams did the heaviest player drafted by Arizona Coyotes have played for? | heaviest player refers to MAX(weight_in_lb); drafted by Arizona Coyotes refers to overallby = 'Arizona Coyotes'; | SELECT COUNT(T2.TEAM) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN weight_info AS T3 ON T1.weight = T3.weight_id WHERE T1.overallby = 'Arizona Coyotes' ORDER BY T3.weight_in_lbs DESC LIMIT 1 |
ice_hockey_draft | Calculate the average weight in pounds of all players drafted by Arizona Coyotes. | 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'; | SELECT CAST(SUM(T1.weight_in_lbs) AS REAL) / COUNT(T2.ELITEID) FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.overallby = 'Arizona Coyotes' |
ice_hockey_draft | Calculate the average height in centimeter of all players who played in Acadie-Bathurst Titan during regular season. | 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'; | SELECT CAST(SUM(T1.height_in_cm) AS REAL) / COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height INNER JOIN SeasonStatus AS T3 ON T2.ELITEID = T3.ELITEID WHERE T3.TEAM = 'Acadie-Bathurst Titan' AND T3.GAMETYPE = 'Regular Season' |
ice_hockey_draft | How many games did Per Mars play in the 1997-1998 season? | 1997-1998 season refers to SEASON = '1997-1998'; | SELECT T2.GP FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.SEASON = '1997-1998' AND T1.PlayerName = 'Pavel Patera' |
ice_hockey_draft | How heavy is Matthias Trattnig in kilograms? | how heavy in kilograms refers to weight_in_kg; | SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.PlayerName = 'Pavel Patera' |
ice_hockey_draft | List the name of players who have a height over 5'9. | names of players refers to PlayerName; height over 5'9 refers to height_in_inch > '5''9"'; | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '5''9"' |
ice_hockey_draft | What team did Niklas Eckerblom play in the 1997-1998 season? | 1997-1998 season refers to SEASON = '1997-1998'; | SELECT T2.TEAM FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.SEASON = '1997-1998' AND T1.PlayerName = 'Niko Kapanen' |
ice_hockey_draft | Which team has the most Swedish? | Swedish refers to nation = 'Sweden'; team with the most Swedish refers to MAX(TEAM WHERE nation = 'Sweden'); | SELECT T.TEAM FROM ( SELECT T2.TEAM, COUNT(DISTINCT T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.nation = 'Sweden' GROUP BY T2.TEAM ORDER BY COUNT(DISTINCT T1.ELITEID) DESC LIMIT 1 ) AS T |
ice_hockey_draft | How many playoffs did Per Mars participate in? | playoffs refers to GAMETYPE = 'Playoffs'; | SELECT SUM(T2.GP) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.PlayerName = 'Per Mars' AND T2.GAMETYPE = 'Playoffs' |
ice_hockey_draft | Name the player who had the most goals for team Rimouski Oceanic in playoff. | 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'; | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.TEAM = 'Rimouski Oceanic' AND T2.GAMETYPE = 'Playoffs' ORDER BY T2.G DESC LIMIT 1 |
ice_hockey_draft | Which country do most players of team Plymouth Whalers come from? | country and nation are synonyms; country where most players come from refers to MAX(COUNT(nation WHERE TEAM = 'Plymouth Whalers')); players refers to PlayerName; team Plymouth Whalers refers to TEAM = 'Plymouth Whalers'; | SELECT T.nation FROM ( SELECT T1.nation, COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.TEAM = 'Plymouth Whalers' GROUP BY T1.nation ORDER BY COUNT(T1.ELITEID) DESC LIMIT 1 ) AS T |
ice_hockey_draft | Who had the most assists of team Plymouth Whalers in the 1999-2000 season? | who refers to PlayerName; most assists refers to MAX(A); team Plymouth Whalers refers to TEAM = 'Plymouth Whalers'; 1999-2000 season refers to SEASON = '1999-2000'; | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.TEAM = 'Plymouth Whalers' AND T2.SEASON = '1999-2000' ORDER BY T2.A DESC LIMIT 1 |
ice_hockey_draft | Indicate the height of all players from team Oshawa Generals in inches. | height in inches refers to height_in_inch; players refers to PlayerName; team Oshawa Generals refers to TEAM = 'Oshawa Generals'; | SELECT T3.height_in_inch FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'Oshawa Generals' |
ice_hockey_draft | Who is the oldest player that participated in OHL league in the 1997 - 2000 season? | oldest player refers to MIN(birthdate); OHL league refers to LEAGUE = 'OHL'; 1997-2000 season refers to SEASON = '1997-2000'; | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.LEAGUE = 'OHL' AND T2.SEASON = '1999-2000' ORDER BY T1.birthdate LIMIT 1 |
ice_hockey_draft | Who is the tallest player in team USA U20? | tallest refers to MAX(height_in_cm);
player refers to PlayerName; team USA U20 refers to TEAM = 'USA U20'; | SELECT T.PlayerName FROM ( SELECT T1.PlayerName, T3.height_in_cm FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'USA U20' ORDER BY T3.height_in_cm DESC ) AS T WHERE T.height_in_cm = ( SELECT MAX(T3.height_in_cm) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'USA U20' ) |
ice_hockey_draft | What is the percentage of Swedish players in playoffs games in the 1997 - 2000 season? | percentage = MULTIPLY(DIVIDE(SUM(nation = 'Sweden'), COUNT(ELITEID) WHERE SEASON = '1997-2000'), 100); Swedish refers to nation = 'Sweden'; players refers to PlayerName; playoffs games refers to GAMETYPE = 'Playoffs'; 1997-2000 season refers to 3 consecutive SEASONs : '1997-1998', '1998-1999', '1999-2000'; | SELECT DISTINCT CAST(COUNT(CASE WHEN T1.nation = 'Sweden' THEN T1.ELITEID ELSE NULL END) OVER (PARTITION BY T2.SEASON) AS REAL) * 100 / COUNT(T1.ELITEID) OVER (PARTITION BY T2.SEASON) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.SEASON IN ('1997-1998', '1998-1999', '1999-2000') |
ice_hockey_draft | Calculate the percentage of penalty minutes of Swedish players in OHL league among all players. | percentage = MULTIPLY(DIVIDE(SUM(PIM WHERE nation = 'Sweden'), COUNT(ELITEID) WHERE LEAGUE = 'OHL'), 100); Swedish refers to nation = 'Sweden'; players refers to PlayerName; OHL league refers to LEAGUE = 'OHL'; | SELECT CAST(COUNT(CASE WHEN T1.nation = 'Sweden' THEN T2.PIM ELSE NULL END) AS REAL) * 100 / COUNT(*) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.LEAGUE = 'OHL' |
works_cycles | What is the average standard cost of product number CA-1098? | Average cost = AVG(StandardCost) | SELECT AVG(T2.StandardCost) FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductNumber = 'CA-1098' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.