oracle 时间分段统计
oracle 时间分段统计先对时间进行分段嵌套进统计的目标其他时间段无值补零分割某段时间到某段时间 每三小时一份先对时间进行分段下面是每小时进行分段 select to_char(dt,'yyyy-mm-dd hh24') from ( select to_date(时间,'yyyy-mm-dd hh24') + (level-1)/24 dt from dual connet by level <= 24)时间 : 可以是字符串 可以是查询出来的结果 最后 转成 to_date 后面
原创
2020-09-15 14:09:00 ·
2154 阅读 ·
0 评论