i have 2 tables
players(player_id,name,last_name,team_id,first_pos_id)
games_payed(game_id,play,date,inning,pitcher_id,batter_id,result)
is something like this:
PLAYERS
player_id name last_name team_id first_pos_id
ny1 jhon white yankees 1
chc2 jan kioto cubs 2
ars1 mario vine diamond 4
GAMES_PLAYED
game_id play date inning pitcher_id batter_id result
1 h 12/8/01 1 ny1 ars3 hit
1 o 9/8/01 1 ars3 chc2 out
1 2h 11/8/01 1 chc2 ny1 double
and i need to show:
player_name ,hit,out,double, avg(hit,double)
players(player_id,name,last_name,team_id,first_pos_id)
games_payed(game_id,play,date,inning,pitcher_id,batter_id,result)
is something like this:
PLAYERS
player_id name last_name team_id first_pos_id
ny1 jhon white yankees 1
chc2 jan kioto cubs 2
ars1 mario vine diamond 4
GAMES_PLAYED
game_id play date inning pitcher_id batter_id result
1 h 12/8/01 1 ny1 ars3 hit
1 o 9/8/01 1 ars3 chc2 out
1 2h 11/8/01 1 chc2 ny1 double
and i need to show:
player_name ,hit,out,double, avg(hit,double)