Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: How many parks does Atlanta city have? [/INST]

Output: SELECT count(*) FROM park WHERE city = 'Atlanta';


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: How many games were played in park "Columbia Park" in 1907? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: Count the number of games taken place in park "Columbia Park" in 1907. [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: How many games were played in city Atlanta in 2000? [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: Find the number of games taken place in city Atlanta in 2000. [/INST]

Output: 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';


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: How many games in total did team Boston Red Stockings attend from 2000 to 2010? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990. [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. [/INST]

Output: SELECT T2.name_first ,  T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals';


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007? [/INST]

Output: SELECT T2.name_first ,  T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals';


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: How many home games did the team Boston Red Stockings play from 1990 to 2000 in total? [/INST]

Output: SELECT sum(T1.games) 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 1990 AND 2000;


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: Count the total number of games the team Boston Red Stockings attended from 1990 to 2000. [/INST]

Output: SELECT sum(T1.games) 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 1990 AND 2000;


Input:
[INST] Here is a database schema:
all_star :
player_id [ TEXT ] all_star.player_id = player.player_id
year [ INT ]
game_num [ INT ]
game_id [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
gp [ INT ]
starting_pos [ INT ]

appearances :
year [ INT ]
team_id [ TEXT ] appearances.team_id = team.team_id
league_id [ TEXT ]
player_id [ TEXT ] appearances.player_id = player.player_id
g_all [ INT ]
gs [ INT ]
g_batting [ INT ]
g_defense [ INT ]
g_p [ INT ]
g_c [ INT ]
g_1b [ INT ]
g_2b [ INT ]
g_3b [ INT ]
g_ss [ INT ]
g_lf [ INT ]
g_cf [ INT ]
g_rf [ INT ]
g_of [ INT ]
g_dh [ INT ]
g_ph [ INT ]
g_pr [ INT ]

manager_award :
player_id [ TEXT ] manager_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ INT ]

player_award :
player_id [ TEXT ] player_award.player_id = player.player_id
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
tie [ TEXT ]
notes [ TEXT ]

manager_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ]
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

player_award_vote :
award_id [ TEXT ]
year [ INT ]
league_id [ TEXT ]
player_id [ TEXT ] player_award_vote.player_id = player.player_id
points_won [ INT ]
points_max [ INT ]
votes_first [ INT ]

batting :
player_id [ TEXT ] batting.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

batting_postseason :
year [ INT ]
round [ TEXT ]
player_id [ TEXT ] batting_postseason.player_id = player.player_id
team_id [ TEXT ] batting_postseason.team_id = team.team_id
league_id [ TEXT ]
g [ INT ]
ab [ INT ]
r [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
rbi [ INT ]
sb [ INT ]
cs [ INT ]
bb [ INT ]
so [ INT ]
ibb [ INT ]
hbp [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

player_college :
player_id [ TEXT ] player_college.player_id = player.player_id
college_id [ TEXT ] player_college.college_id = college.college_id
year [ INT ]

fielding :
player_id [ TEXT ] fielding.player_id = player.player_id
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
pb [ INT ]
wp [ INT ]
sb [ INT ]
cs [ INT ]
zr [ INT ]

fielding_outfield :
player_id [ TEXT ] fielding_outfield.player_id = player.player_id
year [ INT ]
stint [ INT ]
glf [ INT ]
gcf [ INT ]
grf [ INT ]

fielding_postseason :
player_id [ TEXT ] fielding_postseason.player_id = player.player_id
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
round [ TEXT ]
pos [ TEXT ]
g [ INT ]
gs [ INT ]
inn_outs [ INT ]
po [ INT ]
a [ INT ]
e [ INT ]
dp [ INT ]
tp [ INT ]
pb [ INT ]
sb [ INT ]
cs [ INT ]

hall_of_fame :
player_id [ TEXT ] hall_of_fame.player_id = player.player_id
yearid [ INT ]
votedby [ TEXT ]
ballots [ INT ]
needed [ INT ]
votes [ INT ]
inducted [ TEXT ]
category [ TEXT ]
needed_note [ TEXT ]

home_game :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ] home_game.team_id = team.team_id
park_id [ TEXT ] home_game.park_id = park.park_id
span_first [ TEXT ]
span_last [ TEXT ]
games [ INT ]
openings [ INT ]
attendance [ INT ]

manager :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]
plyr_mgr [ TEXT ]

manager_half :
player_id [ TEXT ]
year [ INT ]
team_id [ TEXT ] manager_half.team_id = team.team_id
league_id [ TEXT ]
inseason [ INT ]
half [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]
rank [ INT ]

player :
player_id [ TEXT ]
birth_year [ INT ]
birth_month [ INT ]
birth_day [ INT ]
birth_country [ TEXT ]
birth_state [ TEXT ]
birth_city [ TEXT ]
death_year [ INT ]
death_month [ INT ]
death_day [ INT ]
death_country [ TEXT ]
death_state [ TEXT ]
death_city [ TEXT ]
name_first [ TEXT ]
name_last [ TEXT ]
name_given [ TEXT ]
weight [ INT ]
height [ INT ]
bats [ TEXT ]
throws [ TEXT ]
debut [ TEXT ]
final_game [ TEXT ]
retro_id [ TEXT ]
bbref_id [ TEXT ]

park :
park_id [ TEXT ]
park_name [ TEXT ]
park_alias [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

pitching :
player_id [ TEXT ]
year [ INT ]
stint [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ INT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

pitching_postseason :
player_id [ TEXT ]
year [ INT ]
round [ TEXT ]
team_id [ TEXT ]
league_id [ TEXT ]
w [ INT ]
l [ INT ]
g [ INT ]
gs [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
h [ INT ]
er [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
baopp [ TEXT ]
era [ INT ]
ibb [ INT ]
wp [ INT ]
hbp [ INT ]
bk [ INT ]
bfp [ INT ]
gf [ INT ]
r [ INT ]
sh [ INT ]
sf [ INT ]
g_idp [ INT ]

salary :
year [ INT ]
team_id [ TEXT ]
league_id [ TEXT ]
player_id [ TEXT ]
salary [ INT ]

college :
college_id [ TEXT ]
name_full [ TEXT ]
city [ TEXT ]
state [ TEXT ]
country [ TEXT ]

postseason :
year [ INT ]
round [ TEXT ]
team_id_winner [ TEXT ]
league_id_winner [ TEXT ]
team_id_loser [ TEXT ]
league_id_loser [ TEXT ]
wins [ INT ]
losses [ INT ]
ties [ INT ]

team :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
franchise_id [ TEXT ]
div_id [ TEXT ]
rank [ INT ]
g [ INT ]
ghome [ INT ]
w [ INT ]
l [ INT ]
div_win [ TEXT ]
wc_win [ TEXT ]
lg_win [ TEXT ]
ws_win [ TEXT ]
r [ INT ]
ab [ INT ]
h [ INT ]
double [ INT ]
triple [ INT ]
hr [ INT ]
bb [ INT ]
so [ INT ]
sb [ INT ]
cs [ INT ]
hbp [ INT ]
sf [ INT ]
ra [ INT ]
er [ INT ]
era [ INT ]
cg [ INT ]
sho [ INT ]
sv [ INT ]
ipouts [ INT ]
ha [ INT ]
hra [ INT ]
bba [ INT ]
soa [ INT ]
e [ INT ]
dp [ INT ]
fp [ INT ]
name [ TEXT ]
park [ TEXT ]
attendance [ INT ]
bpf [ INT ]
ppf [ INT ]
team_id_br [ TEXT ]
team_id_lahman45 [ TEXT ]
team_id_retro [ TEXT ]

team_franchise :
franchise_id [ TEXT ]
franchise_name [ TEXT ]
active [ TEXT ]
na_assoc [ TEXT ]

team_half :
year [ INT ]
league_id [ TEXT ]
team_id [ TEXT ]
half [ INT ]
div_id [ TEXT ]
div_win [ TEXT ]
rank [ INT ]
g [ INT ]
w [ INT ]
l [ INT ]

Please write me a SQL statement that answers the following question: Which team had the least number of attendances in home games in 1980? [/INST]

Output: SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;