select (case when to_number(substr(a.signtime, 1, 2)) > 0 and to_number(substr(a.signtime, 1, 2)) <= 4 then '0-4点' when to_number(substr(a.signtime, 1, 2)) > 4 and to_number(substr(a.signtime, 1, 2)) <= 8 then '4-8点' when to_number(substr(a.signtime, 1, 2)) > 8 and to_number(substr(a.signtime, 1, 2)) <= 12 then '8-12点' when to_number(substr(a.signtime, 1, 2)) > 12 and to_number(substr(a.signtime, 1, 2)) <= 16 then '12-16点' when to_number(substr(a.signtime, 1, 2)) > 16 and to_number(substr(a.signtime, 1, 2)) <= 20 then '16-20点' when to_number(substr(a.signtime, 1, 2)) > 20 and to_number(substr(a.signtime, 1, 2)) <= 24 then '20-24点' end) as signtime, count(distinct a.contno) as 新单数量, sum(a.prem) / 10000 as 保费 from lis_lcpol a left join com_bankcom b on a.agentcom = b.agentcom where a.operadatatype <> 'D' and a.prem <> 0 and a.salechnl = '03' and b.deptname in ('${deptname}') and a.signdate >= date'2019-09-01'and a.signdate <= date'2019-10-10' group by (case when to_number(substr(a.signtime, 1, 2)) > 0 and to_number(substr(a.signtime, 1, 2)) <= 4 then '0-4点' when to_number(substr(a.signtime, 1, 2)) > 4 and to_number(substr(a.signtime, 1, 2)) <= 8 then '4-8点' when to_number(substr(a.signtime, 1, 2)) > 8 and to_number(substr(a.signtime, 1, 2)) <= 12 then '8-12点' when to_number(substr(a.signtime, 1, 2)) > 12 and to_number(substr(a.signtime, 1, 2)) <= 16 then '12-16点' when to_number(substr(a.signtime, 1, 2)) > 16 and to_number(substr(a.signtime, 1, 2)) <= 20 then '16-20点' when to_number(substr(a.signtime, 1, 2)) > 20 and to_number(substr(a.signtime, 1, 2)) <= 24 then '20-24点' end) order by (case when to_number(substr(a.signtime, 1, 2)) > 0 and to_number(substr(a.signtime, 1, 2)) <= 4 then 1 when to_number(substr(a.signtime, 1, 2)) > 4 and to_number(substr(a.signtime, 1, 2)) <= 8 then 2 when to_number(substr(a.signtime, 1, 2)) > 8 and to_number(substr(a.signtime, 1, 2)) <= 12 then 3 when to_number(substr(a.signtime, 1, 2)) > 12 and to_number(substr(a.signtime, 1, 2)) <= 16 then 4 when to_number(substr(a.signtime, 1, 2)) > 16 and to_number(substr(a.signtime, 1, 2)) <= 20 then 5 when to_number(substr(a.signtime, 1, 2)) > 20 and to_number(substr(a.signtime, 1, 2)) <= 24 then 6 end)报错信息