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

push codes

parent 382fffd0
...@@ -61,15 +61,13 @@ FROM ...@@ -61,15 +61,13 @@ FROM
SELECT partition_date, SELECT partition_date,
cl_id, cl_id,
case when card_content_type in ('qa','answer') then 'qa' else card_content_type end as card_content_type, case when card_content_type in ('qa','answer') then 'qa' else card_content_type end as card_content_type,
CASE WHEN transaction_type in ('ctr') THEN 'ctr预估' CASE when transaction_type in ('fmctr') then 'fmctr'
WHEN transaction_type in ('cvr','ctcvr') THEN 'cvr预估' WHEN transaction_type like '%ctr' THEN 'ctr预估'
WHEN transaction_type like '%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 '保量卡片' when transaction_type in ('newdata') then '保量卡片'
when transaction_type in ('samecity_ctr') then 'samecity_ctr'
when transaction_type in ('samecity_cvr','samecity_ctcvr') then 'samecity_cvr'
when transaction_type in ('hotspot_feed') then 'hotspot_feed' when transaction_type in ('hotspot_feed') then 'hotspot_feed'
when transaction_type in ('fmctr') then 'fmctr'
END AS recommend_type, END AS recommend_type,
card_id, card_id,
app_session_id app_session_id
...@@ -79,21 +77,19 @@ FROM ...@@ -79,21 +77,19 @@ 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','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr') AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed')
or (transaction_type in ('ctr','cvr','ctcvr') and card_content_type in ('qa','answer','user_post'))) or transaction_type like '%ctr' or transaction_type like '%cvr')
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,
cl_id, cl_id,
CASE WHEN transaction_type in ('ctr') THEN 'ctr预估' CASE when transaction_type in ('fmctr') then 'fmctr'
WHEN transaction_type in ('cvr','ctcvr') THEN 'cvr预估' WHEN transaction_type like '%ctr' THEN 'ctr预估'
WHEN transaction_type like '%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 '保量卡片' when transaction_type in ('newdata') then '保量卡片'
when transaction_type in ('samecity_ctr') then 'samecity_ctr' when transaction_type in ('hotspot_feed') then 'hotspot_feed' END,
when transaction_type in ('samecity_cvr','samecity_ctcvr') then 'samecity_cvr'
when transaction_type in ('hotspot_feed') then 'hotspot_feed'
when transaction_type in ('fmctr') then 'fmctr' END,
card_id, card_id,
app_session_id app_session_id
)a )a
...@@ -113,15 +109,13 @@ FROM ...@@ -113,15 +109,13 @@ FROM
SELECT partition_date, SELECT partition_date,
cl_id, cl_id,
case when params['card_content_type'] in ('qa','answer') then 'qa' else params['card_content_type'] end as card_content_type, case when params['card_content_type'] in ('qa','answer') then 'qa' else params['card_content_type'] end as card_content_type,
CASE WHEN params['transaction_type'] in ('ctr') THEN 'ctr预估' CASE when params['transaction_type'] in ('fmctr') then 'fmctr'
WHEN params['transaction_type'] in ('cvr','ctcvr') THEN 'cvr预估' WHEN params['transaction_type'] like '%ctr' THEN 'ctr预估'
WHEN params['transaction_type'] like '%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 '保量卡片' when params['transaction_type'] in ('newdata') then '保量卡片'
when params['transaction_type'] in ('samecity_ctr') then 'samecity_ctr'
when params['transaction_type'] in ('samecity_cvr','samecity_ctcvr') then 'samecity_cvr'
when params['transaction_type'] in ('hotspot_feed') then 'hotspot_feed' when params['transaction_type'] in ('hotspot_feed') then 'hotspot_feed'
when params['transaction_type'] in ('fmctr') then 'fmctr'
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
...@@ -130,21 +124,19 @@ FROM ...@@ -130,21 +124,19 @@ 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','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr') AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed')
or (params['transaction_type'] in ('ctr','cvr','ctcvr') and params['card_content_type'] in ('qa','answer','user_post'))) or params['transaction_type'] like '%ctr' or params['transaction_type'] like '%cvr')
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,
case when params['card_content_type'] in ('qa','answer') then 'qa' else params['card_content_type'] end, case when params['card_content_type'] in ('qa','answer') then 'qa' else params['card_content_type'] end,
CASE WHEN params['transaction_type'] in ('ctr') THEN 'ctr预估' CASE when params['transaction_type'] in ('fmctr') then 'fmctr'
WHEN params['transaction_type'] in ('cvr','ctcvr') THEN 'cvr预估' WHEN params['transaction_type'] like '%ctr' THEN 'ctr预估'
WHEN params['transaction_type'] like '%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 '保量卡片' when params['transaction_type'] in ('newdata') then '保量卡片'
when params['transaction_type'] in ('samecity_ctr') then 'samecity_ctr' when params['transaction_type'] in ('hotspot_feed') then 'hotspot_feed' END,
when params['transaction_type'] in ('samecity_cvr','samecity_ctcvr') then 'samecity_cvr'
when params['transaction_type'] in ('hotspot_feed') then 'hotspot_feed'
when params['transaction_type'] in ('fmctr') then 'fmctr' 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