1.按小时统计数量
SELECT TO_CHAR(RECEIVE_TIME,'HH24') HOUR ,COUNT(*) N FROM PH_PRESCRIPTION P
WHERE TO_CHAR(P.RECEIVE_TIME ,'YYYY-MM-DD')='2018-12-05'
GROUP BY TO_CHAR(RECEIVE_TIME,'HH24')
ORDER BY TO_CHAR(RECEIVE_TIME,'HH24');
2023-07-28 20:36:22
1.按小时统计数量
SELECT TO_CHAR(RECEIVE_TIME,'HH24') HOUR ,COUNT(*) N FROM PH_PRESCRIPTION P
WHERE TO_CHAR(P.RECEIVE_TIME ,'YYYY-MM-DD')='2018-12-05'
GROUP BY TO_CHAR(RECEIVE_TIME,'HH24')
ORDER BY TO_CHAR(RECEIVE_TIME,'HH24');