select stationid, ltrim(cast(count(*)*100.0/(select count(*) from t_sys_user) as dec(18,2)))+'%'
from t_sys_user group by stationid
select stationid, ltrim(cast(count(*)*100.0/(select count(*) from t_sys_user) as dec(18,2)))+'%'
from t_sys_user group by stationid
转载于:https://www.cnblogs.com/dabexiong/p/6672309.html