Commit 50c49eea authored by 魏艺敏's avatar 魏艺敏

push codes

parent 2e643587
...@@ -614,7 +614,7 @@ LEFT JOIN ...@@ -614,7 +614,7 @@ 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','cvr','smr','newdata','hotspot','pgc') AND params['transaction_type'] not in ('-1','ctr','cvr','smr','newdata','hotspot','pgc','samecity_ctr')
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 +626,7 @@ LEFT JOIN ...@@ -626,7 +626,7 @@ 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','cvr','smr','newdata','hotspot','pgc') AND params['transaction_type'] not in ('-1','ctr','cvr','smr','newdata','hotspot','pgc','samecity_ctr')
UNION ALL UNION ALL
...@@ -637,7 +637,7 @@ LEFT JOIN ...@@ -637,7 +637,7 @@ 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','cvr','smr','newdata','hotspot','pgc') AND params['transaction_type'] in ('-1','ctr','cvr','smr','newdata','hotspot','pgc','samecity_ctr')
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 +649,7 @@ LEFT JOIN ...@@ -649,7 +649,7 @@ 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','cvr','smr','newdata','hotspot','pgc') AND params['transaction_type'] in ('-1','ctr','cvr','smr','newdata','hotspot','pgc','samecity_ctr')
)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
......
...@@ -66,6 +66,7 @@ FROM ...@@ -66,6 +66,7 @@ FROM
WHEN transaction_type in ('-1','smr') THEN 'smr' WHEN transaction_type in ('-1','smr') THEN 'smr'
when transaction_type in ('pgc','hotspot') then '热点卡片' when transaction_type in ('pgc','hotspot') then '热点卡片'
when transaction_type in ('newdata') then '保量卡片' when transaction_type in ('newdata') then '保量卡片'
when transaction_type in ('samecity_ctr') then 'samecity_ctr'
END AS recommend_type, END AS recommend_type,
card_id, card_id,
app_session_id app_session_id
...@@ -75,7 +76,7 @@ FROM ...@@ -75,7 +76,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','ctr','smr','cvr','hotspot','pgc','newdata') AND transaction_type in ('-1','ctr','smr','cvr','hotspot','pgc','newdata','samecity_ctr')
AND card_content_type in ('qa','diary','user_post','answer') AND card_content_type in ('qa','diary','user_post','answer')
group by partition_date, group by partition_date,
case when card_content_type in ('qa','answer') then 'qa' else card_content_type end, case when card_content_type in ('qa','answer') then 'qa' else card_content_type end,
...@@ -84,7 +85,8 @@ FROM ...@@ -84,7 +85,8 @@ FROM
WHEN transaction_type in ('cvr') THEN 'cvr预估' WHEN transaction_type in ('cvr') THEN 'cvr预估'
WHEN transaction_type in ('-1','smr') THEN 'smr' WHEN transaction_type in ('-1','smr') THEN 'smr'
when transaction_type in ('pgc','hotspot') then '热点卡片' when transaction_type in ('pgc','hotspot') then '热点卡片'
when transaction_type in ('newdata') then '保量卡片' END, when transaction_type in ('newdata') then '保量卡片'
when transaction_type in ('samecity_ctr') then 'samecity_ctr' END,
card_id, card_id,
app_session_id app_session_id
)a )a
...@@ -109,6 +111,7 @@ FROM ...@@ -109,6 +111,7 @@ FROM
WHEN params['transaction_type'] in ('-1','smr') THEN 'smr' WHEN params['transaction_type'] in ('-1','smr') THEN 'smr'
when params['transaction_type'] in ('pgc','hotspot') then '热点卡片' when params['transaction_type'] in ('pgc','hotspot') then '热点卡片'
when params['transaction_type'] in ('newdata') then '保量卡片' when params['transaction_type'] in ('newdata') then '保量卡片'
when params['transaction_type'] in ('samecity_ctr') then 'samecity_ctr'
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
...@@ -117,7 +120,7 @@ FROM ...@@ -117,7 +120,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','ctr','smr','cvr','hotspot','pgc','newdata') AND params['transaction_type'] in ('-1','ctr','smr','cvr','hotspot','pgc','newdata','samecity_ctr')
AND params['card_content_type'] in ('qa','diary','user_post','answer') AND params['card_content_type'] in ('qa','diary','user_post','answer')
GROUP BY partition_date, GROUP BY partition_date,
cl_id, cl_id,
...@@ -126,7 +129,8 @@ FROM ...@@ -126,7 +129,8 @@ FROM
WHEN params['transaction_type'] in ('cvr') THEN 'cvr预估' WHEN params['transaction_type'] in ('cvr') THEN 'cvr预估'
WHEN params['transaction_type'] in ('-1','smr') THEN 'smr' WHEN params['transaction_type'] in ('-1','smr') THEN 'smr'
when params['transaction_type'] in ('pgc','hotspot') then '热点卡片' when params['transaction_type'] in ('pgc','hotspot') then '热点卡片'
when params['transaction_type'] in ('newdata') then '保量卡片' END, when params['transaction_type'] in ('newdata') then '保量卡片'
when params['transaction_type'] in ('samecity_ctr') then 'samecity_ctr' 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