Others

Average Each Player’s Last 10 Scores in Microsoft Access

Nimra MalikNimra Malik Nov 25, 2026 868 views

Question details

Calculate the average of each player’s 10 most recent non-null scores in a Microsoft Access query.

Average Each Player’s Last 10 Scores in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
Players have different numbers of score entries, and some entries may share the same date.
Observed behavior
The desired query returns one average per player using up to 10 qualifying scores, ordered by date with a unique entry ID as a tie-breaker.
Before you start

Identify the scores table, the player identifier, the unique entry ID, the score field, and the date field. The example assumes every score has a player ID and that EntryID uniquely identifies an entry.

Solution 1Recommended

Use a correlated TOP 10 query in Microsoft Access

Select each player’s 10 most recent non-null scores before calculating the average.

The subquery is correlated by PlayerID, so TOP 10 is applied separately to each player. EntryID breaks ties when scores share the same date.

Replace Scores, PlayerID, EntryID, Score, and ScoreDate with the actual table and field names. If the date has no time component, the larger EntryID is treated as more recent when dates match.

1
Open SQL View

In Access, select Create > Query Design, close the table selection window if it appears, and switch to View > SQL View.

2
Enter the query

Paste this SQL and replace the example names with your own: SELECT p.[PlayerID], Avg(p.[Score]) AS AverageLast10 FROM [Scores] AS p WHERE p.[Score] Is Not Null AND p.[EntryID] IN (SELECT TOP 10 s.[EntryID] FROM [Scores] AS s WHERE s.[PlayerID] = p.[PlayerID] AND s.[Score] Is Not Null ORDER BY s.[ScoreDate] DESC, s.[EntryID] DESC) GROUP BY p.[PlayerID];

3
Run and verify the results

Select Run on the Query Design tab. Check a player with more than 10 scores against the 10 qualifying entries shown in the scores table, and verify that the average excludes older entries.

4
Inspect the selected entries

To check which rows are included, return to SQL View, replace the SELECT line with SELECT p.[PlayerID], p.[EntryID], p.[ScoreDate], p.[Score], and remove the GROUP BY line. Run the query and confirm that no player has more than 10 rows.

Use a correlated TOP 10 query in Microsoft Access
Players with fewer than 10 scores: The average uses all available non-null scores when a player has fewer than 10. Players with no qualifying scores do not appear in the results.
Free Microsoft Office alternative

Review exported score data with WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface for working with spreadsheet files. Export Access score data to Excel format to review it in WPS Spreadsheets; WPS does not run or repair the Access query.

Review and sort exported player scores in a spreadsheetOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface for an easier transitionWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the query use EntryID as well as the date?

In the subquery’s ORDER BY clause, EntryID provides a unique tie-breaker when multiple scores have the same ScoreDate. With the example’s descending order, the larger EntryID is selected first.

What happens when a player has fewer than 10 non-null scores?

TOP 10 returns all available qualifying entries for that player, and Avg calculates their average. A player with no non-null scores is not included.

Why might an average still include more than 10 scores?

In SQL View, check that the subquery compares s.PlayerID with p.PlayerID and returns unique EntryID values. Also include EntryID in the ORDER BY clause to break date ties, then inspect the selected detail rows before grouping.

Can I display player names instead of IDs?

Yes. Join the query result to a players table using PlayerID, then add the player name to the output. Grouping by the unique ID first avoids combining different players who share a name.

Can WPS Office run this Access query?

No. Run the SQL in Microsoft Access. You can export the scores or query results from Access to an Excel file and open that file in WPS Spreadsheets for review.