select !kolona! as kolona, count(idlice) as broj, replace(cast(round(cast(count(idlice) as numeric(12,4)) * 100 / Q.ukupno, 2) as numeric(5,2)), '.', ',') as procenat from
(
select * from vTestiranaLicaGrid WHERE !filter!
) P
CROSS JOIN
(
select count(*) as ukupno from vTestiranaLicaGrid WHERE !filter!
) Q
group by !kolona!, ukupno order by !kolona!