//按天然周統計
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')