select sum(IngestTimeLength)Year,
sum(IngestTimeLength)Month,
sum(IngestTimeLength)Date
from talename
where group by to_char(IngestTime,'YYYY'),
group by to_char(IngestTime,'YYYYMM'),
group by to_char(IngestTime,'YYYYMMDD')
sum(IngestTimeLength)Month,
sum(IngestTimeLength)Date
from talename
where group by to_char(IngestTime,'YYYY'),
group by to_char(IngestTime,'YYYYMM'),
group by to_char(IngestTime,'YYYYMMDD')
解决方案 »
- 求字符拼接SQL
- oracle listener问题
- SQL语句 查询员工总数以及获得补助的员工数
- 如何在安装oracle11g的时候,设置不安装EM.
- oracle数据库启动后自己停止,alert.log看不出问题,急求解决
- 大家一般把一个用户的所有表都放在一个表空间里面?会不会分开来放到多个表空间里?
- ORACLE表字段增加,为什么相关的视图和过程和方法都会出现错误?
- 提问:两表联合查询问题??
- 协议适配器错误?
- 求sql语句varchar转int 遇到特殊字符跳过
- substr(IngestTime,1,10) as date 这句SQL为什么不行呢?
- 关于plsql,我第一次接触,很急,一点之前希望有人可以回答
能帮我嘛?不行我再加200分送你,决不食言!!!
拜托啦!!!
from talename
group by substr(IngestTime,1,10);
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) from
(select to_char(IngestTime,'YYYY') year,
to_char(IngestTime,'YYYYMM') month,
to_char(IngestTime,'YYYYMMDD') day,
IngestTimeLength from talename)
group by year,month,day
(select to_char(IngestTime,'YYYY') year,
to_char(IngestTime,'YYYY-MM') month,
to_char(IngestTime,'YYYY-MM-DD') day,
IngestTimeLength from talename)
group by year,month,day
不知行了不?
substr(IngestTime,1,7) as month,
substr(IngestTime,1,10) as day,
sum(IngestTimeLength) from table_name
group by
rollup(substr(IngestTime,1,4),substr(IngestTime,1,7),substr(IngestTime,1,10));
不知道你看不看清楚