每天
select count(1),to_char(StartTime,'yyyy-mm-dd') from tablename where UrlTarget like '%Agent%' and to_char(StartTime,'yyyy-mm-dd') >='2010-05-01' group by to_char(StartTime,'yyyy-mm-dd') order by to_char(StartTime,'yyyy-mm-dd') ;
每月
select count(1),to_char(StartTime,'mm') from tablename where UrlTarget like '%Agent%' and to_char(StartTime,'yyyy-mm-dd') >='2010-05-01' group by to_char(StartTime,'mm') order by to_char(StartTime,'mm') ;