Commit fbf4f5e9 authored by 魏艺敏's avatar 魏艺敏

push codes

parent c2eb2314
...@@ -614,7 +614,8 @@ LEFT JOIN ...@@ -614,7 +614,8 @@ LEFT JOIN
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'home' AND page_name = 'home'
AND action = 'on_click_card' AND action = 'on_click_card'
AND params['transaction_type'] not in ('-1','ctr','smr','cvr','ctcvr','hotspot','pgc','newdata','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr') AND params['transaction_type'] not in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
and params['transaction_type'] not like '%ctr' or params['transaction_type'] like '%cvr')
AND params['card_content_type'] IN ('diary','diary_topic','user_post','doctor_post','question','answer','qa','live','article') AND params['card_content_type'] IN ('diary','diary_topic','user_post','doctor_post','question','answer','qa','live','article')
UNION ALL UNION ALL
...@@ -626,7 +627,8 @@ LEFT JOIN ...@@ -626,7 +627,8 @@ LEFT JOIN
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'home' AND page_name = 'home'
AND action in ( 'on_click_diary_card','on_click_answer_card','on_click_question_card','on_click_topic_card','on_click_live_card') AND action in ( 'on_click_diary_card','on_click_answer_card','on_click_question_card','on_click_topic_card','on_click_live_card')
AND params['transaction_type'] not in ('-1','ctr','smr','cvr','ctcvr','hotspot','pgc','newdata','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr') AND params['transaction_type'] not in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
and params['transaction_type'] not like '%ctr' or params['transaction_type'] like '%cvr')
UNION ALL UNION ALL
...@@ -637,7 +639,8 @@ LEFT JOIN ...@@ -637,7 +639,8 @@ LEFT JOIN
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'home' AND page_name = 'home'
AND action = 'on_click_card' AND action = 'on_click_card'
AND params['transaction_type'] in ('-1','ctr','smr','cvr','ctcvr','hotspot','pgc','newdata','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr') AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
or params['transaction_type'] like '%ctr' or params['transaction_type'] like '%cvr'))
AND params['card_content_type'] IN ('diary','diary_topic','user_post','doctor_post','question','answer','qa','live','article') AND params['card_content_type'] IN ('diary','diary_topic','user_post','doctor_post','question','answer','qa','live','article')
UNION ALL UNION ALL
...@@ -649,7 +652,8 @@ LEFT JOIN ...@@ -649,7 +652,8 @@ LEFT JOIN
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'home' AND page_name = 'home'
AND action in ('on_click_diary_card','on_click_answer_card','on_click_question_card','on_click_topic_card','on_click_live_card') AND action in ('on_click_diary_card','on_click_answer_card','on_click_question_card','on_click_topic_card','on_click_live_card')
AND params['transaction_type'] in ('-1','ctr','smr','cvr','ctcvr','hotspot','pgc','newdata','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr') AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
or params['transaction_type'] like '%ctr' or params['transaction_type'] like '%cvr'))
)t2 )t2
ON t1.partition_date=t2.partition_date ON t1.partition_date=t2.partition_date
AND t1.device_id=t2.cl_id AND t1.device_id=t2.cl_id
......
...@@ -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 (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed') AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
or transaction_type like '%ctr' or transaction_type like '%cvr') or params['transaction_type'] like '%ctr' or params['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') AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
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
......
...@@ -68,7 +68,12 @@ FROM ...@@ -68,7 +68,12 @@ FROM
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','合计') end AS recommend_type, when transaction_type in ('hotspot_feed') then array('hotspot_feed','合计')
when transaction_type in ('aistragegy') then array('新用户AI帖优先')
when transaction_type in ('excestragegy') then array('新用户精华帖优先')
when transaction_type in ('fixedstragegy') then array(' 新氧新用户策略一')
when transaction_type in ('fixedstragegy_video') then array('新氧新用户策略二') end
AS recommend_type,
card_id, card_id,
app_session_id app_session_id
from online.ml_community_precise_exposure_detail from online.ml_community_precise_exposure_detail
...@@ -77,7 +82,7 @@ FROM ...@@ -77,7 +82,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') AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
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,
...@@ -90,7 +95,11 @@ FROM ...@@ -90,7 +95,11 @@ FROM
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','合计')end, when transaction_type in ('hotspot_feed') then array('hotspot_feed','合计')
when transaction_type in ('aistragegy') then array('新用户AI帖优先')
when transaction_type in ('excestragegy') then array('新用户精华帖优先')
when transaction_type in ('fixedstragegy') then array(' 新氧新用户策略一')
when transaction_type in ('fixedstragegy_video') then array('新氧新用户策略二') end,
card_id, card_id,
app_session_id app_session_id
)a )a
...@@ -98,7 +107,7 @@ FROM ...@@ -98,7 +107,7 @@ FROM
group by partition_date,card_content_type,cl_id,v.recommend_type,card_id group by partition_date,card_content_type,cl_id,v.recommend_type,card_id
)t2 )t2
on t1.device_id=t2.cl_id and t1.partition_date=t2.partition_date on t1.device_id=t2.cl_id and t1.partition_date=t2.partition_date
LEFT JOIN LEFT JOIN
(--卡片,卡片id和session_id去重 (--卡片,卡片id和session_id去重
SELECT partition_date, SELECT partition_date,
card_content_type, card_content_type,
...@@ -118,7 +127,12 @@ FROM ...@@ -118,7 +127,12 @@ FROM
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','合计')end AS recommend_type, 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 ('excestragegy') then array('新用户精华帖优先')
when params['transaction_type'] in ('fixedstragegy') then array(' 新氧新用户策略一')
when params['transaction_type'] in ('fixedstragegy_video') then array('新氧新用户策略二')
end AS recommend_type,
params['card_id'] as card_id, params['card_id'] as card_id,
app_session_id app_session_id
from online.bl_hdfs_maidian_updates from online.bl_hdfs_maidian_updates
...@@ -126,7 +140,7 @@ FROM ...@@ -126,7 +140,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') AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed','aistragegy','excestragegy','fixedstragegy','fixedstragegy_video')
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,
...@@ -139,7 +153,11 @@ FROM ...@@ -139,7 +153,11 @@ FROM
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','合计')end, 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 ('excestragegy') then array('新用户精华帖优先')
when params['transaction_type'] in ('fixedstragegy') then array(' 新氧新用户策略一')
when params['transaction_type'] in ('fixedstragegy_video') then array('新氧新用户策略二') end,
params['card_id'], params['card_id'],
app_session_id app_session_id
)a )a
......
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