SELECT
TO_CHAR (f.COUNT_TIME, 'hh24') AS hour,
SUM(f.TOTAL_NUM) AS total
FROM
T_TRAFFIC_SECTION_FLOW f
WHERE
TO_CHAR (TRUNC (f.COUNT_TIME),'yyyy-mm-dd')
=
(SELECT TO_CHAR (SYSDATE-1, 'yyyy-mm-dd') FROM DUAL)
GROUP BY TO_CHAR (f.COUNT_TIME, 'hh24')
ORDER BY hour
oracle昨日每小时的统计
最新推荐文章于 2024-02-04 15:48:22 发布