Select top records for multiple entries

E

emulcahy

I need some help.. I have a query that does exactly what I want, except
it returns too much data. The query is:

SELECT Master.[Old Part], Counts.[Count Date], Counts.Count,
Master.[Change Date]
FROM Master LEFT JOIN Counts ON Master.[Old Part] = Counts.[Old Part]
WHERE (((IsNull([master].[change date]))=True))
ORDER BY Counts.[Count Date] DESC;

The problem being, I want 3 records per Master.[Old Part]. I want to
end up with more than just 3 records total, so I can't use LIMIT or TOP
3. I just don't want more than 3 records that have the same Master.[Old
Part].

So how would I modify this query to limit it to 3 entries per [Old
Part]? I assume I have to use a second Select query but the howto of
that is beyond me...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top