Times list top 15

S

sharpie23

Here is my problem. I got some help before, but it isn't working.

I have a database with kids' times for each course that we run. Each
year they may run a course several times. The information I have in
the file on them is Name, Grade, Course, RunTime, RunYear, Male/
Female.

I am trying to get a list of all of the top 15 times in a particular
course.


But since there are multiple entries for a kid on each course, I get
the following

SAvannah 2006 17:30
Savannah 2005 17:32
Savannah 2006 17:45
Stepahanie 2007 17:48
Kristina 2007 18:01
Stepahnie 2006 18:03

But what I want is just:

Savannah 2006 17:30
Stephanie 2007 17:48
Kristina 2006 18:03

How do I get it to do this...only taking the best time for each
person.
Whenever I use a "total" query as was suggested before it pairs kids
with times that are not their times.

Please be as detailed as you can on your responses.

Thanks in advance!
 
K

KARL DEWEY

Use these two queries ---
Sharpie_Min_RunTime ---
SELECT Sharpie.Name, Min(Sharpie.RunTime) AS MinOfRunTime
FROM Sharpie
GROUP BY Sharpie.Name;

SELECT Sharpie.Name, Sharpie.Grade, Sharpie.Course, Sharpie.RunTime,
Sharpie.RunYear, Sharpie.[Male/Female]
FROM Sharpie INNER JOIN Sharpie_Min_RunTime ON (Sharpie.RunTime =
Sharpie_Min_RunTime.MinOfRunTime) AND (Sharpie.Name =
Sharpie_Min_RunTime.Name);

It could be done in one query if you know subqueries.
 

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