I have a database that tracks tournament results. I am developing a rankings program in order to rank all players who have participated in past tournaments.
I do not need help with the actual ranking algorithms, I need help retrieving the data that will be used in the ranking algorithms.
In order to produce the rankings, I need the following information.
- List of all players who participated in at least one tournament during the last 36 months
- Each of these players top score from the last 72 months
To make things more complicated, each tournament contains 5 rounds. Each player is ranked separately in each round. So I am looking for the top monthly score for each player, for each round for the previous 72 months.
We have about 5,000 different players who have competed over the last three years, so I am estimating that I need to retrieve about 1.8 million scores.
5,000 players * 72 months * 5 rounds = 1,800,000 scores
Once I have access to this information, I can easily calculate the rankings as desired.
I suspect processing this much data might take some time. I do not know if I can do this using only queries and tables, or if I should use VB code.
Any suggestions or thoughts would be appreciated.
My table structure is set up as follows:
tblPlayers
PlayerID (pk) (AutoNumber)
FirstName (Text)
LastName (Text)
Club (Text)
Country (Text)
tblEvents
EventID (pk) (AutoNumber)
divID (fk) (Number)
StartDate (Date/Time)
EventName (Text)
Venue (Text)
tblResults
ResultID (pk) (AutoNumber)
EventID (fk) (Number)
PlayerID (fk) (Number)
Level (Number)
Round1Score (Number)
Round2Score (Number)
Round3Score (Number)
Round4Score (Number)
Round5Score (Number)