试一试这个SELECT COUNT(strCpUid) AS num1, StrServiceid,count(case state when 0 then 1 eles null end) as num0,
count(case state when 1 then 1 eles null end) as num1,
count(case state when 2 then 1 eles null end) as num0
FROM T_CP_DZ_USER
GROUP BY StrServiceid ORDER BY StrServiceid
count(case state when 1 then 1 eles null end) as num1,
count(case state when 2 then 1 eles null end) as num0
FROM T_CP_DZ_USER
GROUP BY StrServiceid ORDER BY StrServiceid
返回多行,sql错误.
FROM T_CP_DZ_USER
where 0=0 and strDateTime>='040418135931' and strDateTime<='040419135931' AND strCpUid = 'SXTX'