Top scorer

dspinner56

New member
Local time
Today, 01:55
Joined
Dec 11, 2024
Messages
2
I have a database tracking basketball statistics. I have a query that gives me the top 5 individual game performances....

Player Points
Bob 24
Bill 22
Bob 21
Jim 20
Bob 19

I want each player to appear only once - in this case

Bob - 24
Bill - 22
JIm - 20
Dave - 19
Mark - 18

Anny suggestions?
 
It's a pretty simple aggregate query:


Instead of Summing, you get the MAX:


Code:
SELECT Player, MAX(Points) AS HighestScore
FROM YourTableNameHere
GROUP BY Player
ORDER BY MAX(Points)
 
plog has the right idea but needs a little finishing
Code:
SELECT TOP 5 Player, Max(Points) as MaxPoints
FROM tblScores
GROUP BY Player
ORDER BY Max(Points);

You will need to determine how you would handle ties.
 

Users who are viewing this thread

Back
Top Bottom