I have the following code that works, but I want the 'pcttotalorders' column to have 4 decimal places. enter image description here
select
vendorno as 'Vendor', count (*) as 'Number Of Orders', count (*)*100/(
select
count(*)
from
mas_tfi.dbo.ap_invoicehistoryheader
) as pcttotalorders
from
mas_tfi.dbo.ap_invoicehistoryheader
group by
vendorno
order by
'Number of Orders' desc;