--统计每天指定时间段内的数据
select count(*) as 每天数量, trunc(t.modify_dat,'DD')
from t_total t
where t.modify_dat between to_date('2012-7-24','yyyy-mm-dd') and to_date('2012-7-30','yyyy-mm-dd')
and to_number(to_char(t.modify_dat,'hh24')) between 12 and 14
group by trunc(t.modify_dat,'DD');