oracle 按照周 分组
2016-03-09 00:00
411 查看
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 <= to_date('2013-12-30','yyyy-mm-dd') and dep.vcity='北京市' group by to_char(p.create_date,'WW') order by dat asc
本文出自 “小浩” 博客,请务必保留此出处http://zhangchi.blog.51cto.com/5214280/1251152
相关文章推荐
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- Oracle Containers for J2EE远程安全漏洞(CVE-2014-0413)
- Oracle 10g R2不能使用EM的问题
- 表空间操作
- PreparedStatement中in子句的处理
- VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本
- oracle sql日期比较
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- OS block size和Oracle block size,查找OS Blocksize的方法
- oracle中创建数据库和表空间的几点总结
- 数据库自动备份脚本
- oracle的nvl函数的使用介绍
- 解决oracle用户连接失败的解决方法
- oracle的一些tips技巧
- Oracle 下的开发日积月累
- Oracle存储过程之数据库中获取数据实例
- Windows下ORACLE 10g完全卸载的方法分析
- Oracle 函数大全[字符串函数,数学函数,日期函数]第1/4页
- ORACLE LATERAL-SQL-INJECTION 个人见解