I followed the guide exactly on the last post of the link I gave, just substituting your field names.
Create this query first:
Code:
SELECT Batting.playerID, Batting.yearID, IIf(IsNull([ab]) Or [ab]=0,0,[h]/[ab]) AS BatAvg
FROM Batting
ORDER BY Batting.playerID, IIf(IsNull([ab]) Or [ab]=0,0,[h]/[ab]) DESC;
Save it as QryPre
Create this query second:
Code:
SELECT PlayerID, YearID, BatAvg FROM QryPre WHERE BatAvg IN (SELECT TOP 6 BatAvg FROM QryPre as PreQry WHERE PreQry.PlayerID = QryPre.PlayerID ORDER BY BatAvg DESC)
top 6 years (by batting average) for each player