周期统计

select t.staffid, count(*), to_char(t.opertime, 'yyyy-mm') aaa
  from t_bsf_operatelog t
where t.staffid = '101'
group by to_char(t.opertime, 'yyyy-mm'), t.staffid;


select t.staffid, count(*), to_char(t.opertime, 'yyyy-mm dd') aaa
  from t_bsf_operatelog t
where t.staffid = '101'
group by to_char(t.opertime, 'yyyy-mm dd'), t.staffid

select t.staffid, count(*), to_char(t.opertime, 'iw') aaa
  from t_bsf_operatelog t
where t.staffid = '101'
group by to_char(t.opertime, 'iw'), t.staffid

你可能感兴趣的:(统计)