CREATE TABLE all_star (
    player_id TEXT,
    year NUMBER,
    game_num NUMBER,
    game_id TEXT,
    team_id TEXT,
    league_id TEXT,
    gp NUMBER,
    starting_pos NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE appearances (
    year NUMBER,
    team_id TEXT,
    league_id TEXT,
    player_id TEXT,
    g_all NUMBER,
    gs NUMBER,
    g_batting NUMBER,
    g_defense NUMBER,
    g_p NUMBER,
    g_c NUMBER,
    g_1b NUMBER,
    g_2b NUMBER,
    g_3b NUMBER,
    g_ss NUMBER,
    g_lf NUMBER,
    g_cf NUMBER,
    g_rf NUMBER,
    g_of NUMBER,
    g_dh NUMBER,
    g_ph NUMBER,
    g_pr NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id"),
    FOREIGN KEY ("team_id") REFERENCES team("team_id")
);
CREATE TABLE manager_award (
    player_id TEXT,
    award_id TEXT,
    year NUMBER,
    league_id TEXT,
    tie TEXT,
    notes NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE player_award (
    player_id TEXT,
    award_id TEXT,
    year NUMBER,
    league_id TEXT,
    tie TEXT,
    notes TEXT,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE manager_award_vote (
    award_id TEXT,
    year NUMBER,
    league_id TEXT,
    player_id TEXT,
    points_won NUMBER,
    points_max NUMBER,
    votes_first NUMBER
);
CREATE TABLE player_award_vote (
    award_id TEXT,
    year NUMBER,
    league_id TEXT,
    player_id TEXT,
    points_won NUMBER,
    points_max NUMBER,
    votes_first NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE batting (
    player_id TEXT,
    year NUMBER,
    stint NUMBER,
    team_id TEXT,
    league_id TEXT,
    g NUMBER,
    ab NUMBER,
    r NUMBER,
    h NUMBER,
    double NUMBER,
    triple NUMBER,
    hr NUMBER,
    rbi NUMBER,
    sb NUMBER,
    cs NUMBER,
    bb NUMBER,
    so NUMBER,
    ibb NUMBER,
    hbp NUMBER,
    sh NUMBER,
    sf NUMBER,
    g_idp NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE batting_postseason (
    year NUMBER,
    round TEXT,
    player_id TEXT,
    team_id TEXT,
    league_id TEXT,
    g NUMBER,
    ab NUMBER,
    r NUMBER,
    h NUMBER,
    double NUMBER,
    triple NUMBER,
    hr NUMBER,
    rbi NUMBER,
    sb NUMBER,
    cs NUMBER,
    bb NUMBER,
    so NUMBER,
    ibb NUMBER,
    hbp NUMBER,
    sh NUMBER,
    sf NUMBER,
    g_idp NUMBER,
    FOREIGN KEY ("team_id") REFERENCES team("team_id"),
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE player_college (
    player_id TEXT,
    college_id TEXT,
    year NUMBER,
    FOREIGN KEY ("college_id") REFERENCES college("college_id"),
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE fielding (
    player_id TEXT,
    year NUMBER,
    stint NUMBER,
    team_id TEXT,
    league_id TEXT,
    pos TEXT,
    g NUMBER,
    gs NUMBER,
    inn_outs NUMBER,
    po NUMBER,
    a NUMBER,
    e NUMBER,
    dp NUMBER,
    pb NUMBER,
    wp NUMBER,
    sb NUMBER,
    cs NUMBER,
    zr NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE fielding_outfield (
    player_id TEXT,
    year NUMBER,
    stint NUMBER,
    glf NUMBER,
    gcf NUMBER,
    grf NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE fielding_postseason (
    player_id TEXT,
    year NUMBER,
    team_id TEXT,
    league_id TEXT,
    round TEXT,
    pos TEXT,
    g NUMBER,
    gs NUMBER,
    inn_outs NUMBER,
    po NUMBER,
    a NUMBER,
    e NUMBER,
    dp NUMBER,
    tp NUMBER,
    pb NUMBER,
    sb NUMBER,
    cs NUMBER,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE hall_of_fame (
    player_id TEXT,
    yearid NUMBER,
    votedby TEXT,
    ballots NUMBER,
    needed NUMBER,
    votes NUMBER,
    inducted TEXT,
    category TEXT,
    needed_note TEXT,
    FOREIGN KEY ("player_id") REFERENCES player("player_id")
);
CREATE TABLE home_game (
 

Question: What is the total salary expenses of team Boston Red Stockings in 2010?
SQL: SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id_br WHERE T2.name  = 'Boston Red Stockings' AND T1.year  =  2010

Question: How many players were in the team Boston Red Stockings in 2000?
SQL: SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id_br WHERE T2.name  = 'Boston Red Stockings' AND T1.year  =  2000

Question: How many players did Boston Red Stockings have in 2000?
SQL: SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id_br WHERE T2.name  = 'Boston Red Stockings' AND T1.year  =  2000

Question: List the 3 highest salaries of the players in 2001?
SQL: SELECT salary FROM salary WHERE YEAR  =  2001 ORDER BY salary DESC LIMIT 3;

Question: How much salary did the top 3 well-paid players get in 2001?
SQL: SELECT salary FROM salary WHERE YEAR  =  2001 ORDER BY salary DESC LIMIT 3;

Question: What were all the salary values of players in 2010 and 2001?
SQL: SELECT salary FROM salary WHERE YEAR  =  2010 UNION SELECT salary FROM salary WHERE YEAR  =  2001

Question: List all the salary values players received in 2010 and 2001.
SQL: SELECT salary FROM salary WHERE YEAR  =  2010 UNION SELECT salary FROM salary WHERE YEAR  =  2001

Question: In which year did the least people enter hall of fame?
SQL: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;

Question: Find the year in which the least people enter hall of fame.
SQL: SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;

Question: How many parks are there in Atlanta city?
SQL: SELECT count(*) FROM park WHERE city = 'Atlanta';

Question: How many parks does Atlanta city have?
SQL: SELECT count(*) FROM park WHERE city = 'Atlanta';

Question: How many games were played in park "Columbia Park" in 1907?
SQL: SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id  =  T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';

Question: Count the number of games taken place in park "Columbia Park" in 1907.
SQL: SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id  =  T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';

Question: How many games were played in city Atlanta in 2000?
SQL: SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id  =  T2.park_id WHERE T1.year  =  2000 AND T2.city  =  'Atlanta';

Question: Find the number of games taken place in city Atlanta in 2000.
SQL: SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id  =  T2.park_id WHERE T1.year  =  2000 AND T2.city  =  'Atlanta';

Question: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?
SQL: SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id_br WHERE T2.name  =  'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;

Question: How many games in total did team Boston Red Stockings attend from 2000 to 2010?
SQL: SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id_br WHERE T2.name  =  'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;

Question: How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?
SQL: SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first  =  'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;

Question: Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.
SQL: SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first  =  'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;