查询某张表一天中每小时的数据量
查询某张表一天中每个小时各有多少条数据插入,小弟新人,跪谢各位帮忙!!
------解决方案--------------------select to_char(l.starttime, 'hh'),count(*)
from CPAS_LOG.TABLOG_GS l
where to_char(l.starttime, 'yyyy-mm-dd') = '2012-11-19'
group by to_char(l.starttime, 'hh')
------解决方案--------------------
SELECT COUNT(*)
FROM CPAS_LOG.TABLOG_GS
WHERE to_char(starttime,'yyyy-mm-dd') = '&date'
GROUP BY to_char(starttime, 'hh24');