Commit 817b3b60 authored by 魏艺敏's avatar 魏艺敏

push codes

parent 5cd586fc
...@@ -81,7 +81,7 @@ INSERT OVERWRITE TABLE pm.tl_pm_channel_d PARTITION (PARTITION_DAY = ${partition ...@@ -81,7 +81,7 @@ INSERT OVERWRITE TABLE pm.tl_pm_channel_d PARTITION (PARTITION_DAY = ${partition
INSERT OVERWRITE TABLE pm.tl_pm_operation_d PARTITION (PARTITION_DAY = ${partition_day}) INSERT OVERWRITE TABLE pm.tl_pm_operation_d PARTITION (PARTITION_DAY = ${partition_day})
SELECT t1.partition_date as day_id SELECT tconcat_ws('-',substr(t1.partition_date,1,4),substr(t1.partition_date,5,2),substr(t1.partition_date,7,2)) as day_id
,t1.device_os_type as device_os_type ,t1.device_os_type as device_os_type
,t1.device_type as active_type ,t1.device_type as active_type
,t1.channel as channel ,t1.channel as channel
...@@ -509,8 +509,8 @@ LEFT JOIN ...@@ -509,8 +509,8 @@ LEFT JOIN
AND page_code='home' AND page_code='home'
AND is_exposure='1' AND is_exposure='1'
AND tab_code='精选' AND tab_code='精选'
AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video') AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video','deeplink_strategy')
or params['transaction_type'] like '%ctr' or params['transaction_type'] like '%cvr') or transaction_type like '%ctr' or transaction_type like '%cvr')
AND action in ('page_precise_exposure','home_choiceness_card_exposure') --7745版本action改为page_precise_exposure AND action in ('page_precise_exposure','home_choiceness_card_exposure') --7745版本action改为page_precise_exposure
AND card_content_type in ('user_post','diary','qa','answer') AND card_content_type in ('user_post','diary','qa','answer')
)t1 )t1
...@@ -589,7 +589,7 @@ LEFT JOIN ...@@ -589,7 +589,7 @@ LEFT JOIN
AND action='on_click_card' AND action='on_click_card'
AND page_code ='home' AND page_code ='home'
AND tab_code = '精选' AND tab_code = '精选'
AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video') AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video','deeplink_strategy')
or transaction_type like '%ctr' or transaction_type like '%cvr') or transaction_type like '%ctr' or transaction_type like '%cvr')
AND card_content_type in ('diary','user_post','qa','answer') AND card_content_type in ('diary','user_post','qa','answer')
)t1 )t1
......
SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(day_id,'yyyymmdd'),'yyyy-mm-dd') `日期` SELECT day_id `日期`
,device_os_type `系统` ,device_os_type `系统`
,active_type `新老` ,active_type `新老`
,channel `渠道` ,channel `渠道`
...@@ -70,7 +70,7 @@ SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(day_id,'yyyymmdd'),'yyyy-mm-dd') `日期` ...@@ -70,7 +70,7 @@ SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(day_id,'yyyymmdd'),'yyyy-mm-dd') `日期`
,nvl(wel_second_pv_in_neirongPV,0) as `来自内容页的商业二跳/内容pv` ,nvl(wel_second_pv_in_neirongPV,0) as `来自内容页的商业二跳/内容pv`
,nvl(neirong_second_pv_in_neirongPV,0) as `来自内容页的内容二跳/内容pv` ,nvl(neirong_second_pv_in_neirongPV,0) as `来自内容页的内容二跳/内容pv`
FROM pm.tl_pm_operation_d FROM pm.tl_pm_operation_d
where ((partition_day ='20200824' and day_id<='20200726') where ((partition_day ='20200906' and day_id<='20200808')
or (partition_day<regexp_replace(date_sub(current_date,1),'-','') and partition_day>'20200824' and day_id=regexp_replace(date_sub(FROM_UNIXTIME(UNIX_TIMESTAMP(partition_day,'yyyymmdd'),'yyyy-mm-dd'),29),'-','')) or (partition_day<regexp_replace(date_sub(current_date,1),'-','') and partition_day>'20200906' and day_id=regexp_replace(date_sub(FROM_UNIXTIME(UNIX_TIMESTAMP(partition_day,'yyyymmdd'),'yyyy-mm-dd'),29),'-',''))
or (partition_day=regexp_replace(date_sub(current_date,1),'-','') and day_id>=regexp_replace(date_sub(current_date,30),'-',''))) or (partition_day=regexp_replace(date_sub(current_date,1),'-','') and day_id>=regexp_replace(date_sub(current_date,30),'-','')))
order by `日期`,`系统`,`新老`,`渠道` order by `日期`,`系统`,`新老`,`渠道`
...@@ -20,6 +20,7 @@ SELECT ...@@ -20,6 +20,7 @@ SELECT
t2.recommend_type as recommend_type, t2.recommend_type as recommend_type,
NVL(sum(t3.session_pv),0) as card_click, NVL(sum(t3.session_pv),0) as card_click,
NVL(sum(t2.session_pv),0) as card_exposure, NVL(sum(t2.session_pv),0) as card_exposure,
NVL(sum(t2.session_pv),0) as card_exposure,
NVL(round(sum(page_stay)/count(distinct t4.cl_id)/60,2),0) as avg_page_stay, NVL(round(sum(page_stay)/count(distinct t4.cl_id)/60,2),0) as avg_page_stay,
NVL(sum(navbar_pv),0) as navbar_search, NVL(sum(navbar_pv),0) as navbar_search,
NVL(sum(highlight_pv),0) as highlight_word, NVL(sum(highlight_pv),0) as highlight_word,
...@@ -28,7 +29,10 @@ SELECT ...@@ -28,7 +29,10 @@ SELECT
NVL(sum(recom_content_pv),0) as recommend_content_card, NVL(sum(recom_content_pv),0) as recommend_content_card,
NULL as recommend_special_card, NULL as recommend_special_card,
NVL(sum(referral_pv),0) as transfer_card, NVL(sum(referral_pv),0) as transfer_card,
NVL(sum(video_pv),0) as video_consultation NVL(sum(video_pv),0) as video_consultation,
NVL(sum(post_pv),0) as total_post_pv,
NVL(sum(post_click_pv),0) as post_click_pv
FROM FROM
( (
SELECT partition_date SELECT partition_date
...@@ -48,7 +52,7 @@ FROM ...@@ -48,7 +52,7 @@ FROM
,'promotion_shike','promotion_julang_jl03','promotion_zuimei') ,'promotion_shike','promotion_julang_jl03','promotion_zuimei')
AND first_channel_source_type not LIKE 'promotion\_jf\_%' AND first_channel_source_type not LIKE 'promotion\_jf\_%'
)t1 )t1
JOIN JOIN
(--精准曝光,卡片id和session_id去重 (--精准曝光,卡片id和session_id去重
SELECT partition_date, SELECT partition_date,
card_content_type, card_content_type,
...@@ -66,12 +70,14 @@ FROM ...@@ -66,12 +70,14 @@ FROM
WHEN transaction_type like '%ctr' THEN array('ctr预估','合计') WHEN transaction_type like '%ctr' THEN array('ctr预估','合计')
WHEN transaction_type like '%cvr' THEN array('cvr预估','合计') WHEN transaction_type like '%cvr' THEN array('cvr预估','合计')
WHEN transaction_type in ('-1','smr') THEN array('smr','合计') WHEN transaction_type in ('-1','smr') THEN array('smr','合计')
when transaction_type in ('pgc','hotspot') then array('热点卡片','合计') when transaction_type in ('pgc','hotspot') then array('热点卡片')
when transaction_type in ('newdata') then array('保量卡片') when transaction_type in ('newdata') then array('保量卡片')
when transaction_type in ('hotspot_feed') then array('hotspot_feed','合计') when transaction_type in ('hotspot_feed') then array('hotspot_feed','合计')
when transaction_type in ('aistragegy') then array('新用户AI帖优先') when transaction_type in ('aistragegy') then array('新用户AI帖优先','合计')
when transaction_type in ('excestragegy') then array('新用户精华帖优先') when transaction_type in ('excestragegy') then array('新用户精华帖优先','合计')
when transaction_type in ('deeplink_strategy') then array('deeplink策略') when transaction_type in ('FIXEDSTRATEGY') then array('新氧新用户策略一','合计')
when transaction_type in ('FIXEDSTRATEGY_VIDEO') then array('新氧新用户策略二','合计')
when transaction_type in ('deeplink_strategy') then array('deeplink策略','合计')
end AS recommend_type, end AS recommend_type,
card_id, card_id,
app_session_id app_session_id
...@@ -81,7 +87,7 @@ FROM ...@@ -81,7 +87,7 @@ FROM
AND is_exposure = '1' ----精准曝光 AND is_exposure = '1' ----精准曝光
AND page_name ='home' AND page_name ='home'
AND tab_name = '精选' AND tab_name = '精选'
AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','deeplink_strategy') AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','FIXEDSTRATEGY','FIXEDSTRATEGY_VIDEO','deeplink_strategy')
or transaction_type like '%ctr' or transaction_type like '%cvr') or transaction_type like '%ctr' or transaction_type like '%cvr')
AND card_content_type in ('qa','diary','user_post','answer','special_pool') AND card_content_type in ('qa','diary','user_post','answer','special_pool')
group by partition_date, group by partition_date,
...@@ -92,12 +98,14 @@ FROM ...@@ -92,12 +98,14 @@ FROM
WHEN transaction_type like '%ctr' THEN array('ctr预估','合计') WHEN transaction_type like '%ctr' THEN array('ctr预估','合计')
WHEN transaction_type like '%cvr' THEN array('cvr预估','合计') WHEN transaction_type like '%cvr' THEN array('cvr预估','合计')
WHEN transaction_type in ('-1','smr') THEN array('smr','合计') WHEN transaction_type in ('-1','smr') THEN array('smr','合计')
when transaction_type in ('pgc','hotspot') then array('热点卡片','合计') when transaction_type in ('pgc','hotspot') then array('热点卡片')
when transaction_type in ('newdata') then array('保量卡片') when transaction_type in ('newdata') then array('保量卡片')
when transaction_type in ('hotspot_feed') then array('hotspot_feed','合计') when transaction_type in ('hotspot_feed') then array('hotspot_feed','合计')
when transaction_type in ('aistragegy') then array('新用户AI帖优先') when transaction_type in ('aistragegy') then array('新用户AI帖优先','合计')
when transaction_type in ('excestragegy') then array('新用户精华帖优先') when transaction_type in ('excestragegy') then array('新用户精华帖优先','合计')
when transaction_type in ('deeplink_strategy') then array('deeplink策略') end, when transaction_type in ('FIXEDSTRATEGY') then array('新氧新用户策略一','合计')
when transaction_type in ('FIXEDSTRATEGY_VIDEO') then array('新氧新用户策略二','合计')
when transaction_type in ('deeplink_strategy') then array('deeplink策略','合计') end,
card_id, card_id,
app_session_id app_session_id
)a )a
...@@ -123,12 +131,14 @@ FROM ...@@ -123,12 +131,14 @@ FROM
WHEN params['transaction_type'] like '%ctr' THEN array('ctr预估','合计') WHEN params['transaction_type'] like '%ctr' THEN array('ctr预估','合计')
WHEN params['transaction_type'] like '%cvr' THEN array('cvr预估','合计') WHEN params['transaction_type'] like '%cvr' THEN array('cvr预估','合计')
WHEN params['transaction_type'] in ('-1','smr') THEN array('smr','合计') WHEN params['transaction_type'] in ('-1','smr') THEN array('smr','合计')
when params['transaction_type'] in ('pgc','hotspot') then array('热点卡片','合计') when params['transaction_type'] in ('pgc','hotspot') then array('热点卡片')
when params['transaction_type'] in ('newdata') then array('保量卡片') when params['transaction_type'] in ('newdata') then array('保量卡片')
when params['transaction_type'] in ('hotspot_feed') then array('hotspot_feed','合计') when params['transaction_type'] in ('hotspot_feed') then array('hotspot_feed','合计')
when params['transaction_type'] in ('aistragegy') then array('新用户AI帖优先') when params['transaction_type'] in ('aistragegy') then array('新用户AI帖优先','合计')
when params['transaction_type'] in ('excestragegy') then array('新用户精华帖优先') when params['transaction_type'] in ('excestragegy') then array('新用户精华帖优先','合计')
when params['transaction_type'] in ('deeplink_strategy') then array('deeplink策略') when params['transaction_type'] in ('FIXEDSTRATEGY') then array('新氧新用户策略一','合计')
when params['transaction_type'] in ('FIXEDSTRATEGY_VIDEO') then array('新氧新用户策略二','合计')
when params['transaction_type'] in ('deeplink_strategy') then array('deeplink策略','合计')
end AS recommend_type, end AS recommend_type,
params['card_id'] as card_id, params['card_id'] as card_id,
app_session_id app_session_id
...@@ -137,7 +147,7 @@ FROM ...@@ -137,7 +147,7 @@ FROM
AND action='on_click_card' AND action='on_click_card'
AND params['page_name'] ='home' AND params['page_name'] ='home'
AND params['tab_name'] = '精选' AND params['tab_name'] = '精选'
AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','deeplink_strategy') AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','FIXEDSTRATEGY','FIXEDSTRATEGY_VIDEO','deeplink_strategy')
or params['transaction_type'] like '%ctr' or params['transaction_type'] like '%cvr') or params['transaction_type'] like '%ctr' or params['transaction_type'] like '%cvr')
AND params['card_content_type'] in ('qa','diary','user_post','answer','special_pool') AND params['card_content_type'] in ('qa','diary','user_post','answer','special_pool')
GROUP BY partition_date, GROUP BY partition_date,
...@@ -148,12 +158,14 @@ FROM ...@@ -148,12 +158,14 @@ FROM
WHEN params['transaction_type'] like '%ctr' THEN array('ctr预估','合计') WHEN params['transaction_type'] like '%ctr' THEN array('ctr预估','合计')
WHEN params['transaction_type'] like '%cvr' THEN array('cvr预估','合计') WHEN params['transaction_type'] like '%cvr' THEN array('cvr预估','合计')
WHEN params['transaction_type'] in ('-1','smr') THEN array('smr','合计') WHEN params['transaction_type'] in ('-1','smr') THEN array('smr','合计')
when params['transaction_type'] in ('pgc','hotspot') then array('热点卡片','合计') when params['transaction_type'] in ('pgc','hotspot') then array('热点卡片')
when params['transaction_type'] in ('newdata') then array('保量卡片') when params['transaction_type'] in ('newdata') then array('保量卡片')
when params['transaction_type'] in ('hotspot_feed') then array('hotspot_feed','合计') when params['transaction_type'] in ('hotspot_feed') then array('hotspot_feed','合计')
when params['transaction_type'] in ('aistragegy') then array('新用户AI帖优先') when params['transaction_type'] in ('aistragegy') then array('新用户AI帖优先','合计')
when params['transaction_type'] in ('excestragegy') then array('新用户精华帖优先') when params['transaction_type'] in ('excestragegy') then array('新用户精华帖优先','合计')
when params['transaction_type'] in ('deeplink_strategy') then array('deeplink策略') end, when params['transaction_type'] in ('FIXEDSTRATEGY') then array('新氧新用户策略一','合计')
when params['transaction_type'] in ('FIXEDSTRATEGY_VIDEO') then array('新氧新用户策略二','合计')
when params['transaction_type'] in ('deeplink_strategy') then array('deeplink策略','合计') end,
params['card_id'], params['card_id'],
app_session_id app_session_id
)a )a
...@@ -165,7 +177,7 @@ FROM ...@@ -165,7 +177,7 @@ FROM
and t2.card_id=t3.card_id and t2.card_id=t3.card_id
and t2.card_content_type=t3.card_content_type and t2.card_content_type=t3.card_content_type
and t2.recommend_type=t3.recommend_type and t2.recommend_type=t3.recommend_type
LEFT JOIN LEFT JOIN
(--页面浏览时长 (--页面浏览时长
select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,page_stay select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,page_stay
from from
...@@ -201,7 +213,7 @@ FROM ...@@ -201,7 +213,7 @@ FROM
and t4.cl_id=t3.cl_id and t4.cl_id=t3.cl_id
and t4.business_id=t3.card_id and t4.business_id=t3.card_id
and t4.page_name=t3.card_content_type and t4.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--搜索框和点击行为 (--搜索框和点击行为
select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,navbar_pv select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,navbar_pv
from from
...@@ -238,7 +250,7 @@ FROM ...@@ -238,7 +250,7 @@ FROM
and t5.cl_id=t3.cl_id and t5.cl_id=t3.cl_id
and t5.business_id=t3.card_id and t5.business_id=t3.card_id
and t5.page_name=t3.card_content_type and t5.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--点击高亮词 (--点击高亮词
select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,highlight_pv select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,highlight_pv
from from
...@@ -276,7 +288,7 @@ FROM ...@@ -276,7 +288,7 @@ FROM
and t6.cl_id=t3.cl_id and t6.cl_id=t3.cl_id
and t6.business_id=t3.card_id and t6.business_id=t3.card_id
and t6.page_name=t3.card_content_type and t6.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--关联的美购卡片 (--关联的美购卡片
SELECT partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,count(1) as self_wel_pv SELECT partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,count(1) as self_wel_pv
FROM FROM
...@@ -320,7 +332,7 @@ FROM ...@@ -320,7 +332,7 @@ FROM
and t7.cl_id=t3.cl_id and t7.cl_id=t3.cl_id
and t7.business_id=t3.card_id and t7.business_id=t3.card_id
and t7.page_name=t3.card_content_type and t7.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--推荐的美购卡片(需要排除作者消费的美购) (--推荐的美购卡片(需要排除作者消费的美购)
SELECT partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,count(1) as recom_wel_pv SELECT partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,count(1) as recom_wel_pv
FROM FROM
...@@ -360,7 +372,7 @@ FROM ...@@ -360,7 +372,7 @@ FROM
and t8.cl_id=t3.cl_id and t8.cl_id=t3.cl_id
and t8.business_id=t3.card_id and t8.business_id=t3.card_id
and t8.page_name=t3.card_content_type and t8.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--推荐的内容卡片 (--推荐的内容卡片
SELECT partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,count(1) as recom_content_pv SELECT partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,count(1) as recom_content_pv
FROM FROM
...@@ -399,7 +411,7 @@ FROM ...@@ -399,7 +411,7 @@ FROM
and t9.cl_id=t3.cl_id and t9.cl_id=t3.cl_id
and t9.business_id=t3.card_id and t9.business_id=t3.card_id
and t9.page_name=t3.card_content_type and t9.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--视频面诊点击 (--视频面诊点击
select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,video_pv select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,video_pv
from from
...@@ -437,7 +449,7 @@ FROM ...@@ -437,7 +449,7 @@ FROM
and t10.cl_id=t3.cl_id and t10.cl_id=t3.cl_id
and t10.business_id=t3.card_id and t10.business_id=t3.card_id
and t10.page_name=t3.card_content_type and t10.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--转诊按钮点击 (--转诊按钮点击
select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,referral_pv select partition_date,cl_id,coalesce(b.id,a.business_id) as business_id,a.page_name,referral_pv
from from
...@@ -476,6 +488,48 @@ FROM ...@@ -476,6 +488,48 @@ FROM
and t11.business_id=t3.card_id and t11.business_id=t3.card_id
and t11.page_name=t3.card_content_type and t11.page_name=t3.card_content_type
LEFT JOIN LEFT JOIN
(--从帖子页到帖子页
SELECT partition_date,cl_id,params['referrer_id'] as business_id,
case when page_name in ('post_detail','user_post_detail','doctor_post_detail') then 'user_post'
else null end as page_name,
count(distinct params['business_id'],app_session_id) as post_pv
FROM online.bl_hdfs_maidian_updates
WHERE partition_date=regexp_replace(DATE_SUB(current_date,1) ,'-','')
AND action='page_view'
AND page_name IN ('post_detail','user_post_detail','doctor_post_detail','custom_special')
AND (json_split(params['referrer_link'])[size(json_split(params['referrer_link']))-1]IN ('post_detail','user_post_detail','doctor_post_detail')
and json_split(params['referrer_link'])[size(json_split(params['referrer_link']))-2]='home')
group by partition_date,cl_id,params['referrer_id'],
case when page_name in ('post_detail','user_post_detail','doctor_post_detail') then 'user_post'
else null end
)t12
on t12.partition_date=t3.partition_date
and t12.cl_id=t3.cl_id
and t12.business_id=t3.card_id
and t12.page_name=t3.card_content_type
left join
(--在帖子页点击帖子
SELECT partition_date,cl_id,params['business_id'] as business_id,
case when page_name in ('post_detail','user_post_detail','doctor_post_detail') then 'user_post'
else null end as page_name,
count(distinct params['card_id'],app_session_id) as post_click_pv
FROM online.bl_hdfs_maidian_updates
WHERE partition_date=regexp_replace(DATE_SUB(current_date,1) ,'-','')
AND action='on_click_card'
and params['card_content_type'] in ('user_post')
AND page_name IN ('post_detail','user_post_detail','doctor_post_detail')
AND (referrer='home' or
(params['referrer_link'] like '%[%' and
json_split(params['referrer_link'])[size(json_split(params['referrer_link']))-1]='home'))
group by partition_date,cl_id,params['business_id'],
case when page_name in ('post_detail','user_post_detail','doctor_post_detail') then 'user_post'
else null end
)t13
on t13.partition_date=t3.partition_date
and t13.cl_id=t3.cl_id
and t13.business_id=t3.card_id
and t13.page_name=t3.card_content_type
LEFT JOIN
( (
select distinct device_id select distinct device_id
from ml.ml_d_ct_dv_devicespam_d --去除机构刷单设备,即作弊设备(浏览和曝光事件去除) from ml.ml_d_ct_dv_devicespam_d --去除机构刷单设备,即作弊设备(浏览和曝光事件去除)
......
...@@ -18,6 +18,8 @@ SELECT ...@@ -18,6 +18,8 @@ SELECT
recommend_content_card as `来自I的推荐内容点击pv`, recommend_content_card as `来自I的推荐内容点击pv`,
-- '未配置' as `来自I的推荐专题点击pv`, -- '未配置' as `来自I的推荐专题点击pv`,
transfer_card as `来自I的转诊点击pv`, transfer_card as `来自I的转诊点击pv`,
video_consultation as `来自I的视频面诊点击pv`FROM pm.tl_pm_recommend_strategy_d video_consultation as `来自I的视频面诊点击pv`
if(total_post_pv-post_click_pv>=0,total_post_pv-post_click_pv,0) as `帖子页链接点击pv(近似值)`
FROM pm.tl_pm_recommend_strategy_d
WHERE partition_day>='20200824' and partition_day<=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day>='20200824' and partition_day<=regexp_replace(DATE_SUB(current_date,1) ,'-','')
order by `日期` desc ,`设备类型`,`活跃类型`,`卡片类型`,`推荐类型`; order by `日期` desc ,`设备类型`,`活跃类型`,`卡片类型`,`推荐类型`;
\ 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