sub subs, counts, with division problem
Hello all, first post and really new to sub subs too! If any has time, I'm trying to retrieve data like this:
Reason Countee Perc
BENT HEAD 26 (% OF 26 TO 92)
OTHER 24 (% OF 24 TO 92)
etc...
I'm using the SQL below but can't seem to work out the percentage calculation. (The below only returns 0's). Thanks for any help up front!!!
SELECT Reason, COUNT(Reason) AS Countee, COUNT(Reason) /
(SELECT COUNT(ReasonCode)FROM rb_power.RBCOBBLETRK)AS Perc
FROM rb_power.RBCOBBLETRK
GROUP BY Reason
ORDER BY Countee DESC
Thanks!
sub subs, counts, with division problem
Wow! That was quick and it worked great!! Just as an add on - would it be difficult to format like 28.3%?
Thanks Again!