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')
能帮我嘛?不行我再加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));
不知道你看不看清楚