I would like to convert a COUNT
which includes PARTITION BY
in SQL Server. Desired output would be percentage to 2 decimal places with '%' symbol included (78.48%
instead of 78
, for example).
Here is what I have:
(((100 * COUNT(STC_GRADE)) / SUM(COUNT(STC_GRADE)) OVER (PARTITION BY STC_COURSE_NAME
ORDER BY STC_COURSE_NAME))) AS Percentage
Any help would be greatly appreciated!