Hi all, I got this query:
SELECT TEMPO, COUNT(NOME) AS NU FROM HISTORY GROUP BY TEMPO ------ nome(nvarchar), tempo (nvarchar)
the results:
TEMPO NU
L 13
O 8
F 25
I need another column, percentage
TEMPO NU PERCENTAGE
where the pecentage is (Nu/SUM(nu) ) * 100
I tried with
SELECT TEMPO, COUNT(NOME) AS NU, COUNT(NOME) OVER(PARTITION BY NOME) AS TOT FROM HISTORY GROUP BY TEMPO
but it doesn't work...any suggestion? Thanks