TCARPENTER
Programmer
I've pouring over everything I can find regarding ranking on scores but ties are still giving me grief. Here's my query:
This is what I'm getting:
[tt][ul]
School GymnastID Gymnast Event Score Rank
[li]20 101 Gymnast1 Bars 8.50 1[/li]
[li]22 133 Gymnast2 Bars 8.50 1[/li]
[li]20 103 Gymnast3 Bars 8.45 3[/li]
[li]18 151 Gymnast4 Bars 8.35 4[/li]
[/ul][/tt]
I've lots of these that have ties and work out meaning 2 isn't skipped - and I would swear this worked before - what am I doing wrong?
BTW, quniScores just normalizes my data, but here's the query FWIW:
Thanks for any help.
Code:
SELECT quniAAScores.School, quniAAScores.GymnastID, quniAAScores.Gymnast, quniAAScores.Event, quniAAScores.Score, (SELECT 1+ Count(*) FROM quniAAScores AS S WHERE S.Score > quniAAScores.Score AND S.Event = quniAAScores.Event) AS Rank
FROM quniAAScores
WHERE (((quniAAScores.Event)="Bars"))
ORDER BY quniAAScores.Event, quniAAScores.Score DESC;
[tt][ul]
School GymnastID Gymnast Event Score Rank
[li]20 101 Gymnast1 Bars 8.50 1[/li]
[li]22 133 Gymnast2 Bars 8.50 1[/li]
[li]20 103 Gymnast3 Bars 8.45 3[/li]
[li]18 151 Gymnast4 Bars 8.35 4[/li]
[/ul][/tt]
I've lots of these that have ties and work out meaning 2 isn't skipped - and I would swear this worked before - what am I doing wrong?
BTW, quniScores just normalizes my data, but here's the query FWIW:
Code:
SELECT ScoresID, School, GymnastID, Gymnast, "Bars" AS Event, Bars AS Score
FROM Scores
WHERE Bars>0
UNION ALL
SELECT ScoresID, School, GymnastID, Gymnast, "Beam", Beam
FROM Scores
WHERE Beam>0
UNION ALL
SELECT ScoresID, School, GymnastID, Gymnast, "Floor", Floor
FROM Scores
WHERE Floor>0
UNION ALL SELECT ScoresID, School, GymnastID, Gymnast, "Vault", Vault
FROM Scores
WHERE Vault>0;
Thanks for any help.