P
pbuscio
I have a query that shows the players in my pool league ranked by winning pct. what i am looking for is a new query, or changing the existing query to sho the top ranked player for each team only. here is the SQL and a sample output
SELECT tblPlayerStats_2.Rank, tblPlayerStats_2.PlayerName, tblPlayerStats_2.Team, tblPlayerStats_2.GP, tblPlayerStats_2.Won, tblPlayerStats_2.Lost, tblPlayerStats_2.Pct
FROM tblPlayerStats_2
GROUP BY tblPlayerStats_2.Rank, tblPlayerStats_2.PlayerName, tblPlayerStats_2.Team, tblPlayerStats_2.GP, tblPlayerStats_2.Won, tblPlayerStats_2.Lost, tblPlayerStats_2.Pct
ORDER BY tblPlayerStats_2.Rank;
Rank PlayerName Team GP Won Lost Pct
1 Ed Sheehan Doms B 24 21 3 0.88
2 Tom Bow Kat A 23 20 3 0.87
3 Fran Convery Kat B 20 17 3 0.85
3 Mike Monell Doms B 20 17 3 0.85
5 Nick Jankowski McMichaels 11 9 2 0.82
6 John Grassia McMichaels 24 19 5 0.79
7 Mike Pryzwara Sharkys 19 15 4 0.79
7 Tony Zubec Riverside 19 15 4 0.79
9 Warren Darnell McMichaels 23 18 5 0.78
10 John Herrmann Riverside 24 18 6 0.75
10 Nick Comstock Sharkys 24 18 6 0.75
SELECT tblPlayerStats_2.Rank, tblPlayerStats_2.PlayerName, tblPlayerStats_2.Team, tblPlayerStats_2.GP, tblPlayerStats_2.Won, tblPlayerStats_2.Lost, tblPlayerStats_2.Pct
FROM tblPlayerStats_2
GROUP BY tblPlayerStats_2.Rank, tblPlayerStats_2.PlayerName, tblPlayerStats_2.Team, tblPlayerStats_2.GP, tblPlayerStats_2.Won, tblPlayerStats_2.Lost, tblPlayerStats_2.Pct
ORDER BY tblPlayerStats_2.Rank;
Rank PlayerName Team GP Won Lost Pct
1 Ed Sheehan Doms B 24 21 3 0.88
2 Tom Bow Kat A 23 20 3 0.87
3 Fran Convery Kat B 20 17 3 0.85
3 Mike Monell Doms B 20 17 3 0.85
5 Nick Jankowski McMichaels 11 9 2 0.82
6 John Grassia McMichaels 24 19 5 0.79
7 Mike Pryzwara Sharkys 19 15 4 0.79
7 Tony Zubec Riverside 19 15 4 0.79
9 Warren Darnell McMichaels 23 18 5 0.78
10 John Herrmann Riverside 24 18 6 0.75
10 Nick Comstock Sharkys 24 18 6 0.75