db_id
stringclasses
69 values
schema
stringclasses
69 values
m_schema
stringclasses
69 values
question
stringlengths
24
325
sql
stringlengths
23
804
evidence
stringlengths
0
673
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
How many customers in the machinery segment are in debt?
SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0 AND c_mktsegment = 'MACHINERY'
machinery segment refers to c_mktsegment = 'MACHINERY'; in debt refers to c_acctbal < 0
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
How many urgent orders did Clerk#000000001 handle in 1997?
SELECT COUNT(o_orderkey) FROM orders WHERE STRFTIME('%Y', o_orderdate) = '1997' AND o_clerk = 'Clerk#000000001' AND o_orderpriority = '1-URGENT'
urgent order refers to o_orderpriority = '1-URGENT'; Clerk#000000001 refers to o_clerk = 'Clerk#000000001'; 1997 refers to year(o_orderdate) = 1997
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
What is the name of the customer whose order was delivered the longest?
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
name of the customer refers to c_name; delivered the longest refers to max(subtract(l_receiptdate, l_commitdate))
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
How much is the total price of all the orders shipped to customers in 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'
total price = sum(o_totalprice); Argentina refers to n_name = 'Argentina'
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
How many customers in the building segments have orders with a total price of no less than 50,000?
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
building segment refers to c_mktsegment = 'BUILDING'; a total price of no less than 50,000 refers to o_totalprice > 50000
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
Which country has the least number of suppliers?
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
country refers to n_name; the least number of suppliers refers to min(count(s_name))
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
How much is the part supply cost for the 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'
part supply cost refers to ps_supplycost; medium metallic grey dodger linen refers to p_name = 'medium metallic grey dodger linen'
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
What are the top 2 countries with the highest number of indebted suppliers?
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
country refers to c_name; highest number of indebted refers to max(sum(acctbal)) where s_acctbal < 0
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
What are the names of the parts that have a part supply cost of at least 1,000?
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
name of the part refers to p_name; part supply cost of at least 1,000 refers to ps_supplycost > 1000
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
What is the name of the country of the supplier with the highest debt?
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
name of the country refers to n_name; the highest debt refers to min(s_acctbal)
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
Who is the clerk in charge of handling the item with the highest amount of extended price?
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
clerk refers to o_clerk; the highest amount of extended price refers to max(l_extendedprice)
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
What are the total quantities of the items ordered by customer 101660 on 10/5/1995?
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
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'
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
What is the total amount of tax charged for the order placed by customer 88931 on 7/13/994?
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'
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'
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
What are the names of the parts that were ordered by customer 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
name of the part refers to p_name; customer 110942 refers to o_custkey = 110942
retails
CREATE TABLE `customer` ( `c_custkey` INTEGER NOT NULL, `c_mktsegment` TEXT DEFAULT NULL, `c_nationkey` INTEGER DEFAULT NULL, `c_name` TEXT DEFAULT NULL, `c_address` TEXT DEFAULT NULL, `c_phone` TEXT DEFAULT NULL, `c_acctbal` REAL DEFAULT NULL, `c_comment` TEXT DEFAULT NULL, PRIMARY KEY (`c_custkey`),...
【DB_ID】 retails 【Schema】 # Table: main.customer [ (c_custkey:INTEGER, Primary Key, Examples: [1, 2, 3]), (c_mktsegment:TEXT, Examples: [BUILDING, MACHINERY, FURNITURE]), (c_nationkey:INTEGER, Examples: [8, 16, 11]), (c_name:TEXT, Examples: [Customer#000000001, Customer#000000002, Customer#000000003]), (c_address:TEXT, ...
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.
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
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
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the height of David Bornhammar in inches?
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'
heigh in inches refers to height_in_inch;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Please list the names of all the players with a height of over 6'2" inches.
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"'
name of the players refers to PlayerName; height of over 6'2" inches refers to height_in_inch > '6''2"' ;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among the players with a height of over 6'2" inches, how many of them were born in 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'
height of over 6'2" inches refers to height_in_inch > '6''2"'; born in Sweden refers to nation = 'Sweden' ;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the name of the tallest player?
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
tallest player refers to MAX(height_in_cm);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How much does David Bornhammar weigh in kilograms?
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'
weigh in kilograms refers to weight_in_kg;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many players weigh more than 90 kg?
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
weigh more than 90 kg refers to weight_in_kg > 90;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among the players that weigh more than 90 kg, how many of them have a position of defense?
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'
weigh more than 90 kg refers to weight_in_kg > 90; position of defense refers to position_info = 'D' ;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
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?
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 )
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);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
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?
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 )
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);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How much taller is David Bornhammar than Pauli Levokari in centimeters?
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' )
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;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among all the players that are right-shooted, how many of them weigh over 90 kg?
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'
right-shooted refers to shoots = 'R'; weigh over 90 kg refers to weight_in_kg > 90;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Please list the names of all the players that are over 90 kg and are right-shooted.
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'
names of the players refers to PlayerName; over 90 kg refers to weight_in_kg > 90; right-shooted refers to shoots = 'R';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the BMI of David Bornhammar?
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'
BMI = DIVIDE(weight_in_kg, power(DIVIDE(height_in_cm, 100), 2));
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the average height in centimeters of all the players in the position of defense?
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'
average = AVG(height_in_cm); players refers to PlayerName; position of defense refers to position_info = 'D' ;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the weight in pounds of the heaviest player?
SELECT MAX(T2.weight_in_lbs) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id
weight in pounds refers to weight_in_lbs; heaviest player refers to MAX(weight_in_lbs);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many right-shooted players have a height of 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'
right-shooted players refers to shoots = 'R'; height of 5'7'' refers to height_in_inch = '5''7"';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
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?
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
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);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the height in centimeter of the tallest player born in Edmonton, Alberta, Canada?
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many players, who were drafted by Anaheim Ducks in 2008, have played for 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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the weight in kilograms of the player with the highest number of goal differential of all time?
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
weight in kilograms refers to weight_in_kg; highest number of goal differential of all time refers to MAX(PLUSMINUS);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who is the most valuable player in QMJHL league during the 2004-2005 season?
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
most valuable player refers to MAX(P); QMJHL league refers to LEAGUE = 'QMJHL'; 2004-2005 season refers to SEASON = '2004-2005';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What are the names of the players who played for Acadie-Bathurst Titan during the regular season in 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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many games did the tallest player have ever played?
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 )
tallest player refers to MAX(height_in_cm);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who is the youngest player to have played during the 1997-1998 season for OHL League?
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
youngest player refers to MAX(birthdate); 1997-1998 season refers to SEASON = '1997-1998'; OHL league refers to LEAGUE = 'OHL';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among the players who played 72 games, how many are left-shooters?
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'
played 72 games refers to GP = 72; left-shooters refers to shoots = 'L';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
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?
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 Seaso...
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the average weight in pounds of all the players with the highest prospects for the draft?
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 )
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);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among all the teams that made the playoffs in the 2007-2008 season, identify the percentage that played over 20 games.
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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Name the player who scored the most goals in a single game in the 2007-2008 season of WHL?
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Name the Chilliwack Chiefs players who have scored 100 points or more in the NHL.
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
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;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Identify the players who weigh 120 kg.
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
players refers to PlayerName; weigh 120 kg refers to weight_in_kg = 120;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Identify the players with the same height as Brian Gionta. How tall are they?
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' )
players refers to PlayerName; height refers to height_in_cm;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Identify the name and position of the player who has committed the most rule violations.
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 )
name of the player refers to PlayerName; position of the player refers to position_info; committed the most rule violations refers to MAX(PIM);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Name the player who has the most NHL points in draft year.
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 )
name of the player refers to PlayerName; most NHL points in draft year refers to MAX(P);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among all players drafted by the Toronto Maple Leafs, identify the percentage who are from Eastern Europe.
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'
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', 'Hun...
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among all players drafted by the Toronto Maple Leafs in 2008, identify the player with the highest prospects for the draft.
SELECT PlayerName FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND draftyear = '2008' ORDER BY CSS_rank DESC LIMIT 1
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);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Name the player and his team who made the playoffs in the 2006-2007 season of SuperElit league with the highest points.
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
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?
SELECT COUNT(ELITEID) FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND sum_7yr_GP > 300
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;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season?
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among all goals scored by Calgary Hitmen in the 2007-2008 season, identify the percentage scored by Ian Schultz.
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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among all penalty minutes picked up by Ak Bars Kazan in the 1999-2000 season, identify the percentage picked up by Yevgeni Muratov.
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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the birthplace of Aaron Gagnon?
SELECT birthplace FROM PlayerInfo WHERE PlayerName = 'Aaron Gagnon'
FALSE;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the weight in kg of Tony Martensson?
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'
FALSE;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
List out the name of players who weight 190 lbs.
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
name of players refers to PlayerName; weight 190 lbs refers to weight_in_lbs = 190;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who has the heaviest weight?
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
who refers to PlayerName; heaviest weight refers to MAX(weight_in_kg);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the percentage of players who were born in Denmark and weight above 154 lbs?
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
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;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Which team does Andreas Jamtin belong to?
SELECT DISTINCT T1.TEAM FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Andreas Jamtin'
FALSE;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
List out the seasons that Niklas Eckerblom played.
SELECT DISTINCT T1.SEASON FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Niklas Eckerblom'
FALSE;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Mention the type of game that Matthias Trattnig played.
SELECT DISTINCT T1.GAMETYPE FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Matthias Trattnig'
type of game refers to GAMETYPE;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
List out the nation of players who played for the 1997-1998 season .
SELECT DISTINCT T2.nation FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998'
players refers to PlayerName; 1997-1998 season refers to SEASON = '1997-1998';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the highest point highest point of Per Mars in the draft year?
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
highest point in the draft year refers to MAX(P);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among the Italian players, who has the shortest height?
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
Italian refers to nation = 'Italy'; players refers to PlayerName; shortest height refers to MIN(height_in_cm);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
List out the name of players who have a height of 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"'
name of players refers to PlayerName; height of 5'8" refers to height_in_inch = '5''8"';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many players were born in 1982 and have a height above 182cm?
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'
born in 1982 refers to birthyear = 1982; height above 182cm refers to height_in_cm > 182 ;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the percentage of Russian players who have a height of under 200 inch?
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
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;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Among the USA players, who has the lightest weight?
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
USA refers to nation = 'USA' ; players refers to PlayerName; lightest weight refers to MIN(weight_in_lbs);
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who among the players in season 2000-2001 has committed the highest rule violations or penalty minutes?
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
committed the highest rule violations or penalty minutes refers to MAX(PIM); 2000-2001 season refers to SEASON = '2000-2001'
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
List the names of all players in team Avangard Omsk in 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'
names of the players refers to PlayerName; team Avangard Omsk refers to TEAM = 'Avangard Omsk'; 2000-2001 season refers to SEASON = '2000-2001';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations?
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
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;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many players were drafted by Arizona Coyotes whose height reaches 195 centimeters?
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
drafted by Arizona Coyotes refers to overallby = 'Arizona Coyotes'; height reaches 195 centimeters refers to height_in_cm = 195;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
List the names of all players from Avangard Omsk that have played for playoffs in 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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who is the most valuable player who played in the 2000-2001 season of the International league?
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
most valuable player refers to MAX(P); 2000-2001 season refers to SEASON = '2000-2001'; International league refers to LEAGUE = 'International';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many players who were born in 1980 weigh 185 in pounds?
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'
born in 1980 refers to birthyear = 1980; weigh 185 in pounds refers to weight_in_lbs = 185;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who has played the most game plays in the 2000-2001 season of the International league?
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
played the most game plays refers to MAX(GP); 2000-2001 season refers to SEASON = '2000-2001'; International league refers to LEAGUE = 'International';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
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.
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who is the oldest player who played for Avangard Omsk during the regular season in 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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
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?
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many teams did the heaviest player drafted by Arizona Coyotes have played for?
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
heaviest player refers to MAX(weight_in_lb); drafted by Arizona Coyotes refers to overallby = 'Arizona Coyotes';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Calculate the average weight in pounds of all players drafted by 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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Calculate the average height in centimeter of all players who played in Acadie-Bathurst Titan during 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'
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many games did Per Mars play in the 1997-1998 season?
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'
1997-1998 season refers to SEASON = '1997-1998';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How heavy is Matthias Trattnig in kilograms?
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'
how heavy in kilograms refers to weight_in_kg;
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
List the name of players who have a height over 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"'
names of players refers to PlayerName; height over 5'9 refers to height_in_inch > '5''9"';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What team did Niklas Eckerblom play in the 1997-1998 season?
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'
1997-1998 season refers to SEASON = '1997-1998';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Which team has the most Swedish?
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
Swedish refers to nation = 'Sweden'; team with the most Swedish refers to MAX(TEAM WHERE nation = 'Sweden');
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
How many playoffs did Per Mars participate in?
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'
playoffs refers to GAMETYPE = 'Playoffs';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Name the player who had the most goals for team Rimouski Oceanic in playoff.
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Which country do most players of team Plymouth Whalers come from?
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who had the most assists of team Plymouth Whalers in the 1999-2000 season?
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
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Indicate the height of all players from team Oshawa Generals in inches.
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'
height in inches refers to height_in_inch; players refers to PlayerName; team Oshawa Generals refers to TEAM = 'Oshawa Generals';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who is the oldest player that participated in OHL league in the 1997 - 2000 season?
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
oldest player refers to MIN(birthdate); OHL league refers to LEAGUE = 'OHL'; 1997-2000 season refers to SEASON = '1997-2000';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Who is the tallest player in 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) FRO...
tallest refers to MAX(height_in_cm); player refers to PlayerName; team USA U20 refers to TEAM = 'USA U20';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
What is the percentage of Swedish players in playoffs games in the 1997 - 2000 season?
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'...
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';
ice_hockey_draft
CREATE TABLE height_info ( height_id INTEGER primary key, height_in_cm INTEGER, height_in_inch TEXT ); CREATE TABLE weight_info ( weight_id INTEGER primary key, weight_in_kg INTEGER, weight_in_lbs INTEGER ); CREATE TABLE PlayerInfo ( ELITEID IN...
【DB_ID】 ice_hockey_draft 【Schema】 # Table: main.PlayerInfo [ (ELITEID:INTEGER, Primary Key, Examples: [9, 18, 27]), (PlayerName:TEXT, Examples: [David Bornhammar, David Printz, Yared Hagos]), (birthdate:TEXT, Examples: [1981-06-15, 1980-07-24, 1983-03-27]), (birthyear:DATE), (birthmonth:INTEGER, Examples: [6, 7, 3]), (...
Calculate the percentage of penalty minutes of Swedish players in OHL league among all players.
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'
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';
works_cycles
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE CountryRegion ( CountryRegionCode TEXT not null primary key, Name TEXT not null unique, ModifiedDate DATETIME default current_timestamp not null ); CREATE TABLE Cultur...
【DB_ID】 works_cycles 【Schema】 # Table: main.Address [ (AddressID:INTEGER, Primary Key, Examples: [18089, 23192, 25702]), (AddressLine1:TEXT, Examples: [#500-75 O'Connor Street]), (AddressLine2:TEXT, Examples: [Space 55, Unit B-105, #3]), (City:TEXT, Examples: [Ottawa, Burnaby, Dunkerque]), (StateProvinceID:INTEGER, Exa...
What is the average standard cost of product number CA-1098?
SELECT AVG(T2.StandardCost) FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductNumber = 'CA-1098'
Average cost = AVG(StandardCost)