Hello all,
I'm building a database for a high school academic convention and the big
task for this DB is to sort out the contest winners.
Here's the tables (slightly simplified):
tblDelegate
-----------
DelID
LastName
FirstName
School
etc. . .
tblContest
----------
ContID
ContName
etc. . .
tblResult
---------
DelID_FK
ContID_FK
Result
My question is how do I query so that I get the top three places in each
contest, including ties. So if Bob, Sue, Adam, Cindy, and Joe each take
the test in Latin Grammar and the Scores come out 10, 10, 9, 8, and 7
respectively, then the results should be
1st: Bob and Sue
2nd: Adam
3rd: Cindy
with Joe not placing. Using the top predicate would return just the 10s
and the 9 so Bob or Sue would be returned as the 1st, 2nd would be the
other between the two and Adam would be third.
Does anyone any have idea of how to approach this?
Thanks,
-Carlos
I'm building a database for a high school academic convention and the big
task for this DB is to sort out the contest winners.
Here's the tables (slightly simplified):
tblDelegate
-----------
DelID
LastName
FirstName
School
etc. . .
tblContest
----------
ContID
ContName
etc. . .
tblResult
---------
DelID_FK
ContID_FK
Result
My question is how do I query so that I get the top three places in each
contest, including ties. So if Bob, Sue, Adam, Cindy, and Joe each take
the test in Latin Grammar and the Scores come out 10, 10, 9, 8, and 7
respectively, then the results should be
1st: Bob and Sue
2nd: Adam
3rd: Cindy
with Joe not placing. Using the top predicate would return just the 10s
and the 9 so Bob or Sue would be returned as the 1st, 2nd would be the
other between the two and Adam would be third.
Does anyone any have idea of how to approach this?
Thanks,
-Carlos
Comment