ApplyAdult和ApplyEnfant占ApplyNumber(这个是总数)多少百分比
------解决方案--------------------
- SQL code
select a.sceneId, ltrim(cast(sum(b.ApplyAdult)*100./nullif(sum(AppluNumber),0) as decimal(12,2)))+'%' Adultfrom SceneInfo a join ApplyInfo b on a.sceneId = b.sceneIdgroup by a.sceneId-- ???