记录数据如下IngestTime IngestTimeLength
--------------------------------------------------------
2002-08-04 18:18:09 39
2002-08-04 18:52:09 32
2002-08-04 18:59:09 100
2002-08-05 18:21:52 688
2002-08-05 18:34:52 688
2002-08-05 18:45:52 444
2002-08-06 17:06:24 489
2002-08-06 17:34:24 66我想将以上数据按 年、月、日进行分组求和统计,怎么办阿?
如下程序
select sum(IngestTimeLength) as IngestTimeLength from IngestTime where IngestTime between '2002-08-02 00:00:00' and '2002-08-14 00:00:00' group by IngestTime
分组无效!!!哪位大侠肯帮忙?ORACLE里好像没有这方面的函数!!!
--------------------------------------------------------
2002-08-04 18:18:09 39
2002-08-04 18:52:09 32
2002-08-04 18:59:09 100
2002-08-05 18:21:52 688
2002-08-05 18:34:52 688
2002-08-05 18:45:52 444
2002-08-06 17:06:24 489
2002-08-06 17:34:24 66我想将以上数据按 年、月、日进行分组求和统计,怎么办阿?
如下程序
select sum(IngestTimeLength) as IngestTimeLength from IngestTime where IngestTime between '2002-08-02 00:00:00' and '2002-08-14 00:00:00' group by IngestTime
分组无效!!!哪位大侠肯帮忙?ORACLE里好像没有这方面的函数!!!
解决方案 »
- MFC ADO import error LNK2001: 无法解析的外部符号 public: virtual void __thiscall CDialog
- 关于网络传输,中文简体汉字数据的问题,求助
- VC。NET可以调用C#控件吗?
- 请教各位兄弟,怎样用Pen来画箭头,并设置箭头的方向?
- 帮忙,看看这是什么错误?
- VC中的几个问题!!!!
- Runtime error
- 50分回答一个菜鸟问题~!!(急!请帮忙!!)关于DLL的使用
- installshield7.0中installscript中代码怎样与窗体进行数据交换回答对者高分奉上
- vc++6.0 移植到vs2010 出现错误error C2593: “operator +=”不明确怎么解决
- 关于dll的问题
- 如何在对话框DoModal()之前给对话框中的变量赋值?
IngestTime between '2002-08-02 00:00:00' and '2002-08-14 00:00:00' group by substr(IngestTime,1,4) select sum(ingesttimelength) as month from ingesttime where
IngestTime between '2002-08-02 00:00:00' and '2002-08-14 00:00:00' group by substr(IngestTime,1,7) select sum(ingesttimelength) as day from ingesttime where
IngestTime between '2002-08-02 00:00:00' and '2002-08-14 00:00:00' group by substr(IngestTime,1,10)
select sum(IngestTimeLength) as IngestTimeLength from IngestTime where IngestTime between '2002-08-02 00:00:00' and '2002-08-14 00:00:00' group by substr(IngestTime,1,4),substr(IngestTime,6,7),substr(IngestTime,9,10)
select sum(IngestTimeLength) as IngestTimeLength from IngestTime where IngestTime between '2002-08-02 00:00:00' and '2002-08-14 00:00:00' group by substr(IngestTime,1,4),substr(IngestTime,6,7),substr(IngestTime,9,10)