I have the following SQL to calculate percentages which works fine, but because it is rounding down for example 0.7 to 0 and 15.6 to 15, the total is no where near 100%. Can anybody tell me how to do this so it rounds up correctly?
SELECT createdbyname, COUNT(*) AS 'Total', 100 * COUNT(*) /
(SELECT COUNT(*) AS Expr1
FROM FilteredLead) AS 'Percentage'
FROM FilteredLead AS FilteredLead_1
GROUP BY createdbyname
ORDER BY 'Total' DESC
SELECT createdbyname, COUNT(*) AS 'Total', 100 * COUNT(*) /
(SELECT COUNT(*) AS Expr1
FROM FilteredLead) AS 'Percentage'
FROM FilteredLead AS FilteredLead_1
GROUP BY createdbyname
ORDER BY 'Total' DESC