Commit 632b5f88 authored by 魏艺敏's avatar 魏艺敏

Merge branch 'weiyimin' into 'master'

push codes

See merge request !105
parents 1b28d947 a688d5dd
...@@ -340,9 +340,9 @@ FROM ...@@ -340,9 +340,9 @@ FROM
LEFT JOIN LEFT JOIN
(SELECT code,is_spam,is_ai_channel,partition_day (SELECT code,is_spam,is_ai_channel,partition_day
FROM DIM.DIM_AI_CHANNEL_ZP_NEW FROM DIM.DIM_AI_CHANNEL_ZP_NEW
WHERE partition_day >='20190701' and partition_day<=regexp_replace(DATE_SUB(current_date,1) ,'-',''))tmp WHERE partition_day >=regexp_replace(DATE_SUB(current_date,2) ,'-','') and partition_day<=regexp_replace(DATE_SUB(current_date,1) ,'-',''))tmp
on first_channel_source_type=tmp.code and m.partition_date=tmp.partition_day on first_channel_source_type=tmp.code and m.partition_date=tmp.partition_day
WHERE partition_date>='20190701' and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,2) ,'-','') and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
AND active_type IN ('1','2','4') AND active_type IN ('1','2','4')
AND first_channel_source_type not IN ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' AND first_channel_source_type not IN ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
,'wanpu','jinshan','jx','maimai','zhuoyi','huatian','suopingjingling','mocha','mizhe','meika','lamabang' ,'wanpu','jinshan','jx','maimai','zhuoyi','huatian','suopingjingling','mocha','mizhe','meika','lamabang'
...@@ -362,7 +362,7 @@ FROM ...@@ -362,7 +362,7 @@ FROM
SELECT device_id SELECT device_id
,concat_ws('-',substr(partition_date,1,4),substr(partition_date,5,2),substr(partition_date,7,2)) AS partition_date ,concat_ws('-',substr(partition_date,1,4),substr(partition_date,5,2),substr(partition_date,7,2)) AS partition_date
FROM online.ml_device_day_active_status FROM online.ml_device_day_active_status
WHERE partition_date>='20190701' and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,2) ,'-','') and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)t2 )t2
ON t1.device_id=t2.device_id and date_add(t1.partition_date,1)=t2.partition_date ON t1.device_id=t2.device_id and date_add(t1.partition_date,1)=t2.partition_date
...@@ -372,7 +372,7 @@ FROM ...@@ -372,7 +372,7 @@ FROM
,cl_id ,cl_id
,count(distinct time_str) as pv ,count(distinct time_str) as pv
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date>='20190701' and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,2) ,'-','') and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
AND action='on_click_card' AND action='on_click_card'
AND page_name ='home' AND page_name ='home'
and params['card_content_type'] in ('diary','user_post','answer','qa') and params['card_content_type'] in ('diary','user_post','answer','qa')
...@@ -385,7 +385,7 @@ FROM ...@@ -385,7 +385,7 @@ FROM
,cl_id ,cl_id
,count(distinct time_str) as pv ,count(distinct time_str) as pv
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date>='20190701' and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,2) ,'-','') and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
and referrer='home' and referrer='home'
AND action = 'page_view' AND action = 'page_view'
and params['is_push']=0--ios从push点击进入的数据referrer也为首页,故需要去掉(可能存在个别时期的数据有问题) and params['is_push']=0--ios从push点击进入的数据referrer也为首页,故需要去掉(可能存在个别时期的数据有问题)
...@@ -401,7 +401,7 @@ FROM ...@@ -401,7 +401,7 @@ FROM
,cl_id ,cl_id
,count(distinct time_str) as pv ,count(distinct time_str) as pv
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date>='20190701' and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,2) ,'-','') and partition_date<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
and referrer='home' and referrer='home'
AND action = 'page_view' AND action = 'page_view'
AND page_name IN ('diary_detail','topic_detail','post_detail','user_post_detail','doctor_post_detail','question_detail','answer_detail','question_answer_detail', AND page_name IN ('diary_detail','topic_detail','post_detail','user_post_detail','doctor_post_detail','question_detail','answer_detail','question_answer_detail',
......
...@@ -10,6 +10,6 @@ select substr(day_id,1,6) `日期` ...@@ -10,6 +10,6 @@ select substr(day_id,1,6) `日期`
,concat(round(avg(if(no_click_uv_quality=0,NULL,no_click_uv_quality))*100,2),'%') as `未点击首页feed卡片设备次留率/全站次留率` ,concat(round(avg(if(no_click_uv_quality=0,NULL,no_click_uv_quality))*100,2),'%') as `未点击首页feed卡片设备次留率/全站次留率`
,concat(round(avg(if(home_good_click_retention_quality=0,NULL,home_good_click_retention_quality))*100,2),'%') as `当天点击首页feed卡片,且次日依旧点击的次留率/全站次留率` ,concat(round(avg(if(home_good_click_retention_quality=0,NULL,home_good_click_retention_quality))*100,2),'%') as `当天点击首页feed卡片,且次日依旧点击的次留率/全站次留率`
FROM pm.tl_pm_content_retention FROM pm.tl_pm_content_retention
where partition_day>='20201110' and partition_day <= regexp_replace(DATE_SUB(current_date,1) ,'-','') where partition_day>='20201110' and partition_day<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
group by substr(day_id,1,6),device_os_type,active_type,channel group by substr(day_id,1,6),device_os_type,active_type,channel
order by `日期`,`系统`,`活跃`,`渠道` order by `日期`,`系统`,`活跃`,`渠道`
\ No newline at end of file
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