I would like to add a RANKING value to a query .. here is the result from the QUERY.
Essentially .. I would like to add an item "Ranking" or really just a "RowNumber" to show the order of the records .. ie Record#1 (highest CountOfGroup1, 990 in this case) would have ranking = 1 ... Record#2 (771 in this case) = 2.
The data is already sorted by CountOfGroup1 .. which is how I want the records ordered and the Ranking to be evaluated accordingly.
I have found solutions out there but I need something that will not mess up my group by query.
Here is my SQL ...
SELECT Kevin.User, Transmissions.Type, Transmissions.Group, KevinGroup.Name, Count(Transmissions.Group) AS CountOfGroup1, Transmissions.Radio
FROM Kevin RIGHT JOIN (Transmissions LEFT JOIN KevinGroup ON Transmissions.Group = KevinGroup.Group) ON Kevin.Radio = Transmissions.Radio
GROUP BY Kevin.User, Transmissions.Type, Transmissions.Group, KevinGroup.Name, Transmissions.Radio
ORDER BY Count(Transmissions.Group) DESC , Transmissions.Radio DESC;