求oracle数据库中表字段的每个小时均值SQL语句 求oracle数据库中表字段的每个小时均值SQL语句 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 group by to_char(dt,'hh24') 每小时group by trunc(dt,'hh24') 每天每小时 表里有时间字段不?select to_char(datecol,'yyyy-mm-dd hh24'),avg(col2)from tablenamegroup by to_char(datecol,'yyyy-mm-dd hh24') select to_char(dateti,'yyyyMMdd hhmmss') dateCol, datet2 argCol from yyq_date2------------------------------dateCol argCol 20100126 010101 5020100126 010102 10020120101 050117 200select to_char(dateti,'hh'), avg(datet2) from yyq_date2 group by to_char(dateti,'hh') order by to_char(dateti,'hh')--------------------------------------小时 平均值01 7505 200 今天的oracle面试题 大家好,请教大家一个如何学习的问题,请大家帮帮忙! 求救,一个简单触发器,却有这么多问题 oracle 的参数设定问题!请指教一下!!! 菜鸟求助一句简单SQL,谢谢帮忙! 数据库远程连接的问题 菜鸟问题!帮我看看我的怎么解决这个问题吧! 关于分区表!!急!!!!! Oracle 中的表被锁住,造成程序死掉。请问怎么解锁。怎么解决? 请nowhappy()领分,关于解答:新建用户可以以sysdba身份连接数据库 view 为何不能更新 ant脚本导入mysql存储过程、函数,delimiter参数报错
group by trunc(dt,'hh24') 每天每小时
from tablename
group by to_char(datecol,'yyyy-mm-dd hh24')
select to_char(dateti,'yyyyMMdd hhmmss') dateCol, datet2 argCol from yyq_date2
------------------------------
dateCol argCol
20100126 010101 50
20100126 010102 100
20120101 050117 200select to_char(dateti,'hh'), avg(datet2) from yyq_date2 group by to_char(dateti,'hh') order by to_char(dateti,'hh')
--------------------------------------
小时 平均值
01 75
05 200