34,576
社区成员
发帖
与我相关
我的任务
分享
sum(case when 条件 then 1 else 0 end) as cnt
select count (*) as number,paramvalue.param_value,cnt=sum(case when 条件 then 1 else 0 end) from paramvalue join project_fj on danjia between cast(left(param_value ,charindex('-',param_value )-1) as int) and cast(right(param_value ,len(param_value )-charindex('-',param_value )) as int) where paramvalue.paramclass_id=12 group by paramvalue.param_value
sum(case when.... then 1 else 0 end)