clh899 发表于 2018-9-24 10:22:35

oracle 按照周 分组

select to_char(p.create_date,'WW') as dat,  
count(1) as cnt
  
from crm_percustomer p
  
--用拥有者关联员工
  
left join tbl_employee em on em.uuid=p.owner
  
--用员工关联部门,查城市
  
left join tbl_dep dep on dep.uuid=em.dep_uuid
  
where
  
p.create_date >= to_date('2013-01-01','yyyy-mm-dd') and p.create_date
页: [1]
查看完整版本: oracle 按照周 分组