To_date('2015-05-01', 'yyyy-mm-dd')
2015-06-24 15:54
387 查看
------分点部计提汇总奖金----------------------
select dept_code,
emp_code ,
COMMISSION_month,
emp_convert_time,
sum(emp_commis_money)
from TR_TCAS_DEPOT_COMMISSION_EMP
GROUP BY dept_code, emp_code, COMMISSION_month, emp_convert_time
GROUP BY
select t.*
from TT_TCAS_HUBPBS_HUB_EMP_INFO t
where dept_code = '020WD'
and work_date >= to_date('2015-05-01', 'yyyy-mm-dd')
and work_date < to_date('2015-06-01', 'yyyy-mm-dd');
select t.*
from TT_TCAS_HUBPBS_HUB_EMP_INFO t
where dept_code = '020WD'
and work_date >= to_date('2015-05', 'yyyy-mm')
and work_date < to_date('2015-06', 'yyyy-mm');
select t.*, t.rowid
from ccw_push_record t
WHERE T.ALI_USERID IN
('C506A88839298CACB345D076DEAF78A9',
'gill3brKJHdAPjlDtEuhQWcTDbmpvKZWm7oa +
WtN3mUQCYxETDvGao + ZLzOHbRwk01')
AND T.CREATE_TM > to_date('2016-01-25', 'yyyy-mm-dd')
order BY T.CREATE_TM DESC;
merge into (select * from CCWP_QUDAO_HMD where phone is null) d
using (with group1 as (select max(m.id) id,
m.ALIPAY_UID,
m.bind_status,
max(m.bind_status) over(partition by m.ALIPAY_UID) maxStatus
from tlc_alipay_phone_bind m
group by m.ALIPAY_UID, m.bind_status)
select b.*
from group1 g
join tlc_alipay_phone_bind b on g.id = b.id
where g.maxStatus = g.bind_status) s on (d.alipay_uid = s.ALIPAY_UID) when matched then
update
set d.phone = s.phone,
d.alipay_publicid = s.ALIPAY_PUBLICID,
d.falg = 1,
d.creator = 'admin',
d.creattm = sysdate,
d.updator = 'admin',
d.updatetm = sysdate;
commit;
--------------重复数据查询-------------------------
select t.push_type,t.bno,t.order_channel,max(t.create_tm),min(t.create_tm),count(1)
from ccw_push_record t
where t.push_type in ('2', '3', '4')
and trunc(sysdate-2) < t.create_tm
and t.create_tm < trunc(sysdate-1)
group by t.push_type,t.bno,t.order_channel having(count(1))>1
select dept_code,
emp_code ,
COMMISSION_month,
emp_convert_time,
sum(emp_commis_money)
from TR_TCAS_DEPOT_COMMISSION_EMP
GROUP BY dept_code, emp_code, COMMISSION_month, emp_convert_time
GROUP BY
select t.*
from TT_TCAS_HUBPBS_HUB_EMP_INFO t
where dept_code = '020WD'
and work_date >= to_date('2015-05-01', 'yyyy-mm-dd')
and work_date < to_date('2015-06-01', 'yyyy-mm-dd');
select t.*
from TT_TCAS_HUBPBS_HUB_EMP_INFO t
where dept_code = '020WD'
and work_date >= to_date('2015-05', 'yyyy-mm')
and work_date < to_date('2015-06', 'yyyy-mm');
select t.*, t.rowid
from ccw_push_record t
WHERE T.ALI_USERID IN
('C506A88839298CACB345D076DEAF78A9',
'gill3brKJHdAPjlDtEuhQWcTDbmpvKZWm7oa +
WtN3mUQCYxETDvGao + ZLzOHbRwk01')
AND T.CREATE_TM > to_date('2016-01-25', 'yyyy-mm-dd')
order BY T.CREATE_TM DESC;
merge into (select * from CCWP_QUDAO_HMD where phone is null) d
using (with group1 as (select max(m.id) id,
m.ALIPAY_UID,
m.bind_status,
max(m.bind_status) over(partition by m.ALIPAY_UID) maxStatus
from tlc_alipay_phone_bind m
group by m.ALIPAY_UID, m.bind_status)
select b.*
from group1 g
join tlc_alipay_phone_bind b on g.id = b.id
where g.maxStatus = g.bind_status) s on (d.alipay_uid = s.ALIPAY_UID) when matched then
update
set d.phone = s.phone,
d.alipay_publicid = s.ALIPAY_PUBLICID,
d.falg = 1,
d.creator = 'admin',
d.creattm = sysdate,
d.updator = 'admin',
d.updatetm = sysdate;
commit;
--------------重复数据查询-------------------------
select t.push_type,t.bno,t.order_channel,max(t.create_tm),min(t.create_tm),count(1)
from ccw_push_record t
where t.push_type in ('2', '3', '4')
and trunc(sysdate-2) < t.create_tm
and t.create_tm < trunc(sysdate-1)
group by t.push_type,t.bno,t.order_channel having(count(1))>1
相关文章推荐
- 【转】ARM Linux 3.x的设备树(Device Tree)
- Sublime Text常用插件总结及Package Control安装方法
- Django入门笔记【四】
- MyISAM 和 InnoDB 讲解
- Python核心编程笔记--随机数
- Objective-C语法学习 第一天
- DCMTK的Lib 引用顺序
- android 实现加载动画对话框
- Twig for Template Designers -- Annotation
- android Bitmap内存溢出
- 从文件中读取学生成绩,进行等级划分,并输出至另外一个文件中
- 学习JS需要注意的
- vi编辑器 :x与:wq的区别
- Flash网页播放器
- OS X应用程序设计
- 从K近邻算法谈到KD树、BBF算法
- windbg - Getting Started with WinDBG - Part 1
- shell创建函数和引用函数
- j2ee国际化的研究,基于SSH
- Linux平台代码覆盖率测试工具GCOV的前端工具LCOV简介