I am having the hardest time trying to find out how to do percentages in Access.
Here is what I have:
Table1 with columns
Code:
EventID, PlayerID, FGM, FGA
1, 1, 2, 5
2, 1, 1, 5
3, 1, 4, 5
4, 2, 3, 10
5, 1, 4, 10
(Don't know how to add columns to make that table look better)
Basically I want to group all of the records with the same PlayerID and sum the FGM and the FGA and then divide these two totals to get a %.
So for example, PlayerID = 1. Then the Sum(FGM)/Sum(FGA) = 11/25 = 44%.
I even want to get a little crazy with this concept to and add commands to limit this percentage to include the five most recent EventIDs and the 10 most recent EventIDs for each PlayerID. So instead of having a percentage for every record that has the same PlayerID, I want to limit it based on a given range.
If anyone can point me in the right direction, then I would like to try some of this on my own.
Thanks