Hi all



I've tried to follow the MS example in http://support.microsoft.com/kb/210039 which works for just 2 tables, but I have more!

tblDistances / tblRaces / tblResults.

** each race has a single distance
** each race has many results.
** each distance can apply to many races

So the objective is to find the top 3 results for each distance, and show the race name as a consequence. My query so far is as below which just returns the overall top 3 and not per group.
----
I've carried on with this a little more and can get the query to "sort of" work - but it returns the top 3 records for each of the races - Where in fact I need the top 3 records for each "distance" - there can be many races with the same distance.

SELECT tblRaces.Dist, tblRaces.RaceName, tblresults.ResTime, tblresults.ResName
FROM tblRaces INNER JOIN tblresults ON tblRaces.RaceID = tblresults.RaceID
WHERE (((tblresults.ResTime) In (Select Top 3 [ResTime] From tblResults Where [RaceID]=[tblRaces].[RaceID] Order By [ResTime] Asc)))
ORDER BY tblRaces.Dist, tblresults.ResTime;