首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

这个SQL语句如何写?关于百分比的

2012-04-27 
这个SQL语句怎么写?关于百分比的ApplyAdult和ApplyEnfant占ApplyNumber(这个是总数)多少百分比[解决办法]S

这个SQL语句怎么写?关于百分比的


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-- ??? 

热点排行
Bad Request.