--天
select to_char(a.effective_date, 'DD'), sum(a.entered_cr)
from gl_je_lines a
group by to_char(a.effective_date, 'DD');
--月
select to_char(a.effective_date, 'MM'), sum(a.entered_cr)
from gl_je_lines a
group by to_char(a.effective_date, 'MM');
--年
select to_char(a.effective_date, 'YYYY'), sum(a.entered_cr)
from gl_je_lines a
group by to_char(a.effective_date, 'YYYY');
--周
select to_char(a.effective_date, 'iw'), sum(a.entered_cr)
from gl_je_lines a
group by to_char(a.effective_date, 'iw');
--季度
select to_char(a.effective_date, 'q'), sum(a.entered_cr)
from gl_je_lines a
group by to_char(a.effective_date, 'q');