Returning Select Records in Query

tim1234

Registered User.
Local time
Today, 16:58
Joined
Nov 19, 2002
Messages
38
Hello, I am sure this is quite simple, however I cannot figure it out. I have a query that shows tblPartNumber and tblAverage. The average is calculated in the query by taking the total minutes to assemble the parts, divided by the number of parts completed. What I am trying to do is run a query that will show me the most efficient (lowest average), time for each Partnumber. Ideally the query would show me something like this;


Part # Average
1234 .72
1234 .86
1234 .94
etc...

I searched on here and it seemed like the Top 10 is used, but in my application that ommits all of the other partnumbers because it only shows ten of the records for the first partnumber. I only want to see the five most efficient averages. Any help is greatly appreciated.

Thanks, Tim
 
Base this off your query that calculates the average:
SELECT Part, min(average)
FROM OtherQuery
GROUP BY Part
Order by min(average)

You can limit or whatever once you get the basic working.
 
Thanks, I'll give it a try.

Thanks for your help. I will give that a try.
 
Not sure what's wrong

The way I understand what was said was that I create a new query based off of the query that contains the average. Then I use the group by and sorting properties in the query. I still cannot get it to limit for each part number group. I'm not sure what I am doing wrong. Any help is greatly appreciated. Thanks
 

Users who are viewing this thread

Back
Top Bottom