I’m trying to pull
athleteid, firstname, lastname, rushyards, teamname
…while athletes.athleteid = ‘200’
My main goal besides getting this data out is that some athletes may move teams. So like atheleteid = ‘200’ may be on team 10 during weeks 1-4 but on team 15 for weeks 5-16. I’m trying to calculate the stats.rushyards for the entire team and since athleteid = ‘200’ got 20 yards from week 1-4 I want those stats to be reflected in team 10’s stats while his 80 yards during weeks 5-16 I want to be reflected for team 15’s data.
Table: athletes
Field: athleteid
Field: firstname
Field: lastname
Table: stats
Field: athleteid
Field: rushyards
Field: week
Table: tradelog
Field: athleteid
Field: teamid
Field: week
Table: teams
Field: teamid
Field: teamname
Any help is appreciated!