1sf/bird-sql-train-with-schema huggingface dataset:
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: 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.
Evidence: 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
SQL: 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
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What is the height of David Bornhammar in inches?
Evidence: heigh in inches refers to height_in_inch;
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: Please list the names of all the players with a height of over 6'2" inches.
Evidence: name of the players refers to PlayerName; height of over 6'2" inches refers to height_in_inch > '6''2"' ;
SQL: 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"'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: Among the players with a height of over 6'2" inches, how many of them were born in Sweden?
Evidence: height of over 6'2" inches refers to height_in_inch > '6''2"'; born in Sweden refers to nation = 'Sweden' ;
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What is the name of the tallest player?
Evidence: tallest player refers to MAX(height_in_cm);
SQL: 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
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: How much does David Bornhammar weigh in kilograms?
Evidence: weigh in kilograms refers to weight_in_kg;
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: How many players weigh more than 90 kg?
Evidence: weigh more than 90 kg refers to weight_in_kg > 90;
SQL: 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
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: Among the players that weigh more than 90 kg, how many of them have a position of defense?
Evidence: weigh more than 90 kg refers to weight_in_kg > 90; position of defense refers to position_info = 'D' ;
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: 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?
Evidence: 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);
SQL: 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 )
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: 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?
Evidence: 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);
SQL: 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 )
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: How much taller is David Bornhammar than Pauli Levokari in centimeters?
Evidence: 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;
SQL: 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' )
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: Among all the players that are right-shooted, how many of them weigh over 90 kg?
Evidence: right-shooted refers to shoots = 'R'; weigh over 90 kg refers to weight_in_kg > 90;
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: Please list the names of all the players that are over 90 kg and are right-shooted.
Evidence: names of the players refers to PlayerName; over 90 kg refers to weight_in_kg > 90; right-shooted refers to shoots = 'R';
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What is the BMI of David Bornhammar?
Evidence: BMI = DIVIDE(weight_in_kg, power(DIVIDE(height_in_cm, 100), 2));
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What is the average height in centimeters of all the players in the position of defense?
Evidence: average = AVG(height_in_cm); players refers to PlayerName; position of defense refers to position_info = 'D' ;
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What is the weight in pounds of the heaviest player?
Evidence: weight in pounds refers to weight_in_lbs; heaviest player refers to MAX(weight_in_lbs);
SQL: SELECT MAX(T2.weight_in_lbs) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: How many right-shooted players have a height of 5'7''?
Evidence: right-shooted players refers to shoots = 'R'; height of 5'7'' refers to height_in_inch = '5''7"';
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: 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?
Evidence: 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);
SQL: 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
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What is the height in centimeter of the tallest player born in Edmonton, Alberta, Canada?
Evidence: 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';
SQL: 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
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: How many players, who were drafted by Anaheim Ducks in 2008, have played for U.S. National U18 Team?
Evidence: 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';
SQL: 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'
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What is the weight in kilograms of the player with the highest number of goal differential of all time?
Evidence: weight in kilograms refers to weight_in_kg; highest number of goal differential of all time refers to MAX(PLUSMINUS);
SQL: 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
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: Who is the most valuable player in QMJHL league during the 2004-2005 season?
Evidence: most valuable player refers to MAX(P); QMJHL league refers to LEAGUE = 'QMJHL'; 2004-2005 season refers to SEASON = '2004-2005';
SQL: 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
Database: ice_hockey_draft
Tables: height_info, weight_info, PlayerInfo, SeasonStatus
Columns (table index, column name): -1, *, 0, height_id, 0, height_in_cm, 0, height_in_inch, 1, weight_id, 1, weight_in_kg, 1, weight_in_lbs, 2, ELITEID, 2, PlayerName, 2, birthdate, 2, birthyear, 2, birthmonth, 2, birthday, 2, birthplace, 2, nation, 2, height, 2, weight, 2, position_info, 2, shoots, 2, draftyear, 2, draftround, 2, overall, 2, overallby, 2, CSS_rank, 2, sum_7yr_GP, 2, sum_7yr_TOI, 2, GP_greater_than_0, 3, ELITEID, 3, SEASON, 3, TEAM, 3, LEAGUE, 3, GAMETYPE, 3, GP, 3, G, 3, A, 3, P, 3, PIM, 3, PLUSMINUS
Question: What are the names of the players who played for Acadie-Bathurst Titan during the regular season in 1998-1999?
Evidence: 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';
SQL: 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'