字段ATTRIBUTE,按照3300-3305,3305-3310,3310-3315,3315-3320 进行分组,并求其频数,不在组中的频数为0,这种怎么写SQL,用case when 判断 最后求频率的时候不在区间内的数据,该区间就没有了,怎么能让区间还在频数为0。select TO_NUMBER(x) as x,fz,count(fz) from (select case when ATTRIBUTE2<'3295' then '<3295'when ATTRIBUTE2>='3295' and ATTRIBUTE2<'3296' then '3295-3296' when ATTRIBUTE2>='3296' and ATTRIBUTE2<'3297' then '3296-3297' when ATTRIBUTE2>='3297' and ATTRIBUTE2<'3298' then '3297-3298' when ATTRIBUTE2>='3298' and ATTRIBUTE2<'3299' then '3298-3299' when ATTRIBUTE2>='3299' and ATTRIBUTE2<'3300' then '3299-3300' when ATTRIBUTE2>='3300' then '>=3300' end as fz, case when ATTRIBUTE2<'3295' then '3294.5'when ATTRIBUTE2>='3295' and ATTRIBUTE2<'3296' then '3295.5' when ATTRIBUTE2>='3296' and ATTRIBUTE2<'3297' then '3296.5' when ATTRIBUTE2>='3297' and ATTRIBUTE2<'3298' then '3297.5' when ATTRIBUTE2>='3298' and ATTRIBUTE2<'3299' then '3298.5' when ATTRIBUTE2>='3299' and ATTRIBUTE2<'3300' then '3299.5' when ATTRIBUTE2>='3300' then '>=3300.5' end as x from (SELECT equip_id,ATTRIBUTE2FROM MT_DATA_RECORD_YZ_OCV1WHERE equip_id='2680.1'AND WORKCELL_ID ='58984.1'AND TO_CHAR(record_date,'YYYYMMDDHH24')<= TO_CHAR(SYSdate,'YYYYMMDD')||'20'AND TO_CHAR(record_date,'YYYYMMDDHH24')>= TO_CHAR(TO_CHAR(SYSdate,'YYYYMMDD')-1) ||'20'ORDER BY tag_record_date desc )) group by fz,xorder by x