I have the following code
SELECT
Country,
COUNT(*) AS Records,
COUNT(SpecialField) AS Cnt,
COUNT(SpecialField)/COUNT(*) AS Perc_Hit
FROM
Table
GROUP BY
Country
ORDER BY
Cnt DESC, Records DESC
This query returns 0s for the Perc_Hit
column even though it shouldn't. For example, one China has 1000 'records' and 853 'counts', so I'm expecting .853 as my result.
Can someone tell me why there's this error?
Thanks in advance.