Dludora/DAIL-BIRD huggingface dataset:
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: How many players, who were drafted by Anaheim Ducks in 2008, have played for U.S. National U18 Team? drafted by Anaheim Ducks refers to overallby = 'Anaheim Ducks'; in 2008 refers to draftyear = 2008; played for U.S. National U18 Team refers to TEAM = 'U.S. National U18 Team'; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: What is the weight in kilograms of the player with the highest number of goal differential of all time? weight in kilograms refers to weight_in_kg; highest number of goal differential of all time refers to MAX(PLUSMINUS); */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Who is the most valuable player in QMJHL league during the 2004-2005 season? most valuable player refers to MAX(P); QMJHL league refers to LEAGUE = 'QMJHL'; 2004-2005 season refers to SEASON = '2004-2005'; */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: What are the names of the players who played for Acadie-Bathurst Titan during the regular season in 1998-1999? names of the players refers to PlayerName; played for Acadie-Bathurst Titan refers to TEAM = 'AcadieandBathurst Titan'; regular season refers to GAMETYPE = 'Regular Season'; in 1998-1999 refers to SEASON = '1998-1999'; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: How many games did the tallest player have ever played? tallest player refers to MAX(height_in_cm); */
SELECT 
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 )
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Who is the youngest player to have played during the 1997-1998 season for OHL League? youngest player refers to MAX(birthdate); 1997-1998 season refers to SEASON = '1997-1998'; OHL league refers to LEAGUE = 'OHL'; */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Among the players who played 72 games, how many are left-shooters? played 72 games refers to GP = 72; left-shooters refers to shoots = 'L'; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: What is the difference in the number of goals scored by Pavel Brendl during the regular season versus the playoffs in the 1998-1999 season? difference = SUBTRACT(SUM(G WHERE GAMETYPE = 'Regular Season'), SUM(G WHERE GAMETYPE = 'Playoffs') WHERE SEASON = '1998-1999'); number of goals scored refers to G; regular season refers to GAMETYPE = 'Regular Season'; playoffs refers to GAMETYPE = 'Playoffs'; 1998-1999 season refers to SEASON = '1998-1999'; */
SELECT 
SELECT T3.Rs_G - T4.Pf_G AS diff FROM ( SELECT T2.PlayerName, T1.G AS Rs_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Regular Season' ) AS T3 INNER JOIN ( SELECT T2.PlayerName, T1.G AS Pf_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Playoffs' ) AS T4 ON T3.PlayerName = T4.PlayerName
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: What is the average weight in pounds of all the players with the highest prospects for the draft? average = AVG(weight_in_lbs); weight in pounds refers to weight_in_lbs; players refers to PlayerName; highest prospects for the draft refers to MAX(CSS_rank); */
SELECT 
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 )
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Among all the teams that made the playoffs in the 2007-2008 season, identify the percentage that played over 20 games. playoffs refers to GAMETYPE = 'Playoffs'; percentage = MULTIPLY(DIVIDE(SUM(GP > 20), COUNT(ELITEID)), 100); played over 20 games refers to GP > 20; 2007-2008 season refers to SEASON = '2007-2008'; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Name the player who scored the most goals in a single game in the 2007-2008 season of WHL? name of the player refers to PlayerName; scored the most goals in a single game refers to MAX(G); WHL refers to LEAGUE = 'WHL'; 2007-2008 season refers to SEASON = '2007-2008'; */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Name the Chilliwack Chiefs players who have scored 100 points or more in the NHL. name of the player refers to PlayerName; Chilliwack Chiefs refers to TEAM = 'Chilliwack Chiefs'; scored 100 points or more in the NHL refers to P > 100; */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Identify the players who weigh 120 kg. players refers to PlayerName; weigh 120 kg refers to weight_in_kg = 120; */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Identify the players with the same height as Brian Gionta. How tall are they? players refers to PlayerName; height refers to height_in_cm; */
SELECT 
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' )
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Identify the name and position of the player who has committed the most rule violations. name of the player refers to PlayerName; position of the player refers to position_info; committed the most rule violations refers to MAX(PIM); */
SELECT 
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 )
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Name the player who has the most NHL points in draft year. name of the player refers to PlayerName; most NHL points in draft year refers to MAX(P); */
SELECT 
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 )
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Among all players drafted by the Toronto Maple Leafs, identify the percentage who are from Eastern Europe. players refers to PlayerName; drafted by the Toronto Maple Leafs refers to overallby = 'Toronto Maple Leafs'; percentage = MULTIPLY(DIVIDE(SUM(nation = 'Eastern Europe'), COUNT(ELITEID) WHERE overallby = 'Toronto Maple Leafs'), 100); from Eastern Europe refers to nation in ('Belarus', 'Bulgaria', 'Czech Republic', 'Hungary', 'Moldova', 'Poland', 'Romania', 'Slovakia', 'Ukraine'); countries in a continent can be identified by referring to https://worldpopulationreview.com/country-rankings/list-of-countries-by-continent; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Among all players drafted by the Toronto Maple Leafs in 2008, identify the player with the highest prospects for the draft. players refers to PlayerName; drafted by the Toronto Maple Leafs refers to overallby = 'Toronto Maple Leafs'; highest prospects for the draft refers to MAX(CSS_rank); */
SELECT 
SELECT PlayerName FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND draftyear = '2008' ORDER BY CSS_rank DESC LIMIT 1
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Name the player and his team who made the playoffs in the 2006-2007 season of SuperElit league with the highest points. name of the player refers to PlayerName; playoffs refers to GAMETYPE = 'Playoffs'; highest points refers to MAX(P); 2006-2007 season refers to SEASON = '2006-2007'; SuperElit league refers to LEAGUE = 'SuperElit'; */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: How many players who were drafted by the Toronto Maple Leafs have played over 300 games in their first 7 years of the NHL career? drafted by the Toronto Maple Leafs refers to overallby = 'Toronto Maple Leafs'; played over 300 games in their first 7 years of the NHL career refers to sum_7yr_GP > 300; */
SELECT 
SELECT COUNT(ELITEID) FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs' AND sum_7yr_GP > 300
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season? how tall refers to height_in_cm; Yale University refers to TEAM = 'Yale Univ.'; 28 penalty minutes refers to PIM = '28'; 2005-2006 season refers to SEASON = '2005-2006'; */
SELECT 
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
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Among all goals scored by Calgary Hitmen in the 2007-2008 season, identify the percentage scored by Ian Schultz. goals scored refers to G; Calgary Hitmen refers to TEAM = 'Calgary Hitmen'; percentage = MULTIPLY(DIVIDE(SUM(G WHERE PlayerName = 'Ian Schultz'), SUM(G)), 100); 2007-2008 season refers to SEASON = '2007-2008'; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: Among all penalty minutes picked up by Ak Bars Kazan in the 1999-2000 season, identify the percentage picked up by Yevgeni Muratov. penalty minutes refers to PIM; Ak Bars Kazan refers to TEAM = 'Ak Bars Kazan'; percentage = MULTIPLY(DIVIDE(SUM(PIM WHERE PlayerName = 'Yevgeni Muratov'), SUM(PIM)), 100.0); 1999-2000 season refers to SEASON = '1999-2000'; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: What is the birthplace of Aaron Gagnon? FALSE; */
SELECT 
SELECT birthplace FROM PlayerInfo WHERE PlayerName = 'Aaron Gagnon'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: What is the weight in kg of Tony Martensson? FALSE; */
SELECT 
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'
/* Given the following database schema: */
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           INTEGER
            primary key,
    PlayerName        TEXT,
    birthdate         TEXT,
    birthyear         DATE,
    birthmonth        INTEGER,
    birthday          INTEGER,
    birthplace        TEXT,
    nation            TEXT,
    height            INTEGER,
    weight            INTEGER,
    position_info     TEXT,
    shoots            TEXT,
    draftyear         INTEGER,
    draftround        INTEGER,
    overall           INTEGER,
    overallby         TEXT,
    CSS_rank          INTEGER,
    sum_7yr_GP        INTEGER,
    sum_7yr_TOI       INTEGER,
    GP_greater_than_0 TEXT,
    foreign key (height) references height_info(height_id),
    foreign key (weight) references weight_info(weight_id)
)

CREATE TABLE SeasonStatus
(
    ELITEID   INTEGER,
    SEASON    TEXT,
    TEAM      TEXT,
    LEAGUE    TEXT,
    GAMETYPE  TEXT,
    GP        INTEGER,
    G         INTEGER,
    A         INTEGER,
    P         INTEGER,
    PIM       INTEGER,
    PLUSMINUS INTEGER,
    foreign key (ELITEID) references PlayerInfo(ELITEID)
)

/* Answer the following: List out the name of players who weight 190 lbs. name of players refers to PlayerName; weight 190 lbs refers to weight_in_lbs = 190; */
SELECT 
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