G
Guest
I have the following code to rank my Tech's.
SELECT a.String, COUNT(*) AS rank
FROM 04_qry_MTD_Tech_Rank_Calculation AS a INNER JOIN
04_qry_MTD_Tech_Rank_Calculation AS b ON a.Missed_Percent>=b.Missed_Percent
GROUP BY a.String;
However, the issue is that if there are 159 Tech's with the same percentage
then the rank for each tech is 159. What I would like to do is that if there
is 159 Tech's that are ranked 1st then the rank to display would be 1 instead
of 159.
For example, using the current String I end up with:
Tech String Rank
120 159
130 159
150 160
160 160
The desired result would be:
Tech String Rank
120 1
130 1
150 2
160 2
Any help would be greatly appreciated!!
SELECT a.String, COUNT(*) AS rank
FROM 04_qry_MTD_Tech_Rank_Calculation AS a INNER JOIN
04_qry_MTD_Tech_Rank_Calculation AS b ON a.Missed_Percent>=b.Missed_Percent
GROUP BY a.String;
However, the issue is that if there are 159 Tech's with the same percentage
then the rank for each tech is 159. What I would like to do is that if there
is 159 Tech's that are ranked 1st then the rank to display would be 1 instead
of 159.
For example, using the current String I end up with:
Tech String Rank
120 159
130 159
150 160
160 160
The desired result would be:
Tech String Rank
120 1
130 1
150 2
160 2
Any help would be greatly appreciated!!