实例解析: select to_char(log.date, \'yyyy-MM-dd HH24\') as hour, log.exten, sum(case log.grade when \'1\' then 1 else 0 end) as \"1\",