Rounding problem with my result
COUNT() returns and integer. So both the numerator and denominator of the percentage calculation, as written in the question, are integers. As it says in the documentation


  If an integer dividend is divided by an integer divisor, the result is an integer that has any fractional part of the result truncated.


The solution is to cast one or other (or both) to a non-integer type. The rules for precedence are a bit complicated so you may need to fiddle around to get just what you want. Or you can write a second CAST to deliver the percentage as desired.