zhangjl01(提问者)写过,没有起作用啊。select day,
sum(decode(department,\'MES\',SL ,NULL)) \"MES\",
sum(decode(department,\'Report\',SL ,NULL)) \"Report\",
sum(decode(department,\'BC\',SL ,NULL)) \"BC\"
from (
SELECT substr(recordtime,6,5)day , department,COUNT(problemtype) SL FROM Z_ONDUTY WHERE DEPARTMENT IS NOT NULL and recordtime >=\'2018/11/01\' GROUP BY substr(recordtime,6,5),department)
where day>=\'${开始时间}\' and day<=\'${结束时间}\'
group by day
order by day