Hi everyone
I'm a newbie to access and i've been stumped on this query for a while now. The query reads as this
SELECT Teams.Team, Avg([Game Percentages].[FG%]) AS [AvgOfFG%], Avg([Game Percentages].[3PT%]) AS [AvgOf3PT%], Avg([Game Percentages].[FT%]) AS [AvgOfFT%], Avg([Game Percentages].OffReb) AS AvgOfOffReb, Avg([Game Percentages].DefReb) AS AvgOfDefReb, Avg([Game Percentages].Tot) AS AvgOfTot
FROM Teams INNER JOIN (Game INNER JOIN [Game Percentages] ON Game.GameID = [Game Percentages].GameID) ON Teams.TeamID = Game.Home
GROUP BY Teams.Team, Game.Away;
When i put it in datasheet view it gives several rows of the same team with different averages. My tables include
GAME
gameid(pk)
hometeam
awayteam
date
venueid
homeline
awayline
SCORE
gameid(pk)
periodid
score
STATS
gameid(pk)
teamid
fgm
fga
ftm
fta
3ptm
3pta
offreb
defreb
assist
steal
t/o
block
fouls
TEAM
teamid(pk)
team
VENUE
venueid(pk)
venue
PERIOD
periodid(pk)
period
i don't know how to do this because i want the away team but both home and away are linked to team.
Thanks
I'm a newbie to access and i've been stumped on this query for a while now. The query reads as this
SELECT Teams.Team, Avg([Game Percentages].[FG%]) AS [AvgOfFG%], Avg([Game Percentages].[3PT%]) AS [AvgOf3PT%], Avg([Game Percentages].[FT%]) AS [AvgOfFT%], Avg([Game Percentages].OffReb) AS AvgOfOffReb, Avg([Game Percentages].DefReb) AS AvgOfDefReb, Avg([Game Percentages].Tot) AS AvgOfTot
FROM Teams INNER JOIN (Game INNER JOIN [Game Percentages] ON Game.GameID = [Game Percentages].GameID) ON Teams.TeamID = Game.Home
GROUP BY Teams.Team, Game.Away;
When i put it in datasheet view it gives several rows of the same team with different averages. My tables include
GAME
gameid(pk)
hometeam
awayteam
date
venueid
homeline
awayline
SCORE
gameid(pk)
periodid
score
STATS
gameid(pk)
teamid
fgm
fga
ftm
fta
3ptm
3pta
offreb
defreb
assist
steal
t/o
block
fouls
TEAM
teamid(pk)
team
VENUE
venueid(pk)
venue
PERIOD
periodid(pk)
period
i don't know how to do this because i want the away team but both home and away are linked to team.
Thanks