打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
oracle 实现按天,周,月,季度,年查询统计数据
//按天统计
select count(dataid) as 每天操作数量, sum()
from
where
group by trunc(createtime, 'DD'))
//按自然周统计 
select to_char(date,'iw'),sum() 
from 
where 
group by to_char(date,'iw') 
//按自然月统计 
select to_char(date,'mm'),sum() 
from 
where 
group by to_char(date,'mm') 
//按季统计 
select to_char(date,'q'),sum() 
from 
where 
group by to_char(date,'q') 
//按年统计 
select to_char(date,'yyyy'),sum() 
from 
where 
group by to_char(date,'yyyy')

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
oracle 按每天,每周,每月,每季度,每年查询统计数据
Oracle中char到Date和Number的转换
oracle周数计算
xsb Oracle Blog | to
Oracle 中 IW和WW 有何差别
Oracle 查询今天、昨日、本周、本月和本季度的所有记录
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服