怎么获得过去24小时内归档次数发生的情况,比如0-1点发生X次,1-2点发生了Y次

我查看了v$log_history 里面只记录了 归档发生的日期啊

是oracle吗?
select to_char(logdate,'yyyy-mm-dd h24'), count(1) from v$log_history
where logdate>=(select sysdate from dual)-1
group by to_char(logdate,'hh24')
温馨提示:答案为网友推荐,仅供参考
相似回答