Commit 72573d08 authored by 魏艺敏's avatar 魏艺敏

Merge branch 'weiyimin' into 'master'

push codes

See merge request !71
parents 8a9a25a6 2fbc19ed
......@@ -197,8 +197,8 @@ FROM
count(distinct case when push_type in ('106','107','108') then a.message_id end) as will_push_open_pv, --意愿push
count(distinct case when push_type in ('25') then a.message_id end) as sign_push_open_pv, --签到push
count(distinct case when push_type is not null
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94') then a.message_id end) as xitong_push_open_pv, --系统push
count(distinct case when push_type in ('93','94') then a.message_id end) as AI_push_open_pv,
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94','95','96') then a.message_id end) as xitong_push_open_pv, --系统push
count(distinct case when push_type in ('93','94','95','96') then a.message_id end) as AI_push_open_pv,
count(distinct case when push_type is not null and push_type not in ('70','71') then a.message_id end) as auto_push_open_pv --自动push
FROM
(
......@@ -232,7 +232,7 @@ FROM
(
select msg_id,push_type,time_stamp
from online.tl_hdfs_push2_new_view --增量表
where partition_date>='20190801' AND partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
where partition_date>=regexp_replace(DATE_SUB(current_date,7) ,'-','') AND partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
group by msg_id,push_type,time_stamp
)a
left join
......@@ -267,8 +267,8 @@ FROM
count(distinct case when push_type in ('106','107','108') then a.app_session_id end) as will_push_open_2_pv, --意愿push
count(distinct case when push_type in ('25') then a.app_session_id end) as sign_push_open_2_pv, --签到push
count(distinct case when push_type is not null
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94') then a.app_session_id end) as xitong_push_open_2_pv, --系统push
count(distinct case when push_type in ('93','94') then a.app_session_id end) as AI_push_open_2_pv, --签到push
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94','95','96') then a.app_session_id end) as xitong_push_open_2_pv, --系统push
count(distinct case when push_type in ('93','94','95','96') then a.app_session_id end) as AI_push_open_2_pv, --签到push
count(distinct case when push_type is not null and push_type not in ('70','71') then a.app_session_id end) as auto_push_open_2_pv --自动push
FROM
(
......@@ -302,7 +302,7 @@ FROM
(
select msg_id,push_type,time_stamp
from online.tl_hdfs_push2_new_view --增量表
where partition_date>='20190801' AND partition_date<= regexp_replace(DATE_SUB(current_date,1) ,'-','')
where partition_date>=regexp_replace(DATE_SUB(current_date,7) ,'-','') AND partition_date<= regexp_replace(DATE_SUB(current_date,1) ,'-','')
group by msg_id,push_type,time_stamp
)a
left join
......@@ -378,8 +378,8 @@ full join
,count(distinct case when push_type in ('106','107','108') then a.device_id end) as will_receive_uv --意愿push
,count(distinct case when push_type in ('25') then a.device_id end) as sign_receive_uv --签到push
,count(distinct case when push_type is not null
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94') then a.device_id end) as xitong_receive_uv --系统push
,count(distinct case when push_type in ('93','94') then a.device_id end) as AI_receive_uv
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94','95','96') then a.device_id end) as xitong_receive_uv --系统push
,count(distinct case when push_type in ('93','94','95','96') then a.device_id end) as AI_receive_uv
,count(distinct case when push_type is not null and push_type not in ('70','71') then a.device_id end) as auto_receive_uv --自动push
,count(a.device_id) as push_receive_pv
,count(case when push_type in ('70','71') then a.device_id end) as op_receive_pv --运营push push_type in ('70','71')
......@@ -391,8 +391,8 @@ full join
,count(case when push_type in ('106','107','108') then a.device_id end) as will_receive_pv --意愿push
,count(case when push_type in ('25') then a.device_id end) as sign_receive_pv --签到push
,count(case when push_type is not null
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94') then a.device_id end) as xitong_receive_pv --系统push
,count(case when push_type in ('93','94') then a.device_id end) as AI_receive_pv
and push_type not in ('70','71','101','102','103','104','105','111','112','113','106','107','108','25','93','94','95','96') then a.device_id end) as xitong_receive_pv --系统push
,count(case when push_type in ('93','94','95','96') then a.device_id end) as AI_receive_pv
,count(case when push_type is not null and push_type not in ('70','71') then a.device_id end) as auto_receive_pv --自动push
FROM
......@@ -445,7 +445,7 @@ full join
(
select msg_id,push_type,time_stamp
from online.tl_hdfs_push2_new_view --增量表
where partition_date>='20190801' AND partition_date<= regexp_replace(DATE_SUB(current_date,1) ,'-','')
where partition_date>=regexp_replace(DATE_SUB(current_date,7) ,'-','') AND partition_date<= regexp_replace(DATE_SUB(current_date,1) ,'-','')
group by msg_id,push_type,time_stamp
)c
on a.msg_id=c.msg_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment