Commit cc700c4a authored by 赵建伟's avatar 赵建伟

Merge branch 'weiyimin' into 'master'

push codes

See merge request !37
parents a874c4d8 ec988963
......@@ -61,15 +61,13 @@ FROM
SELECT partition_date,
cl_id,
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预估'
WHEN transaction_type in ('cvr','ctcvr') THEN 'cvr预估'
CASE when transaction_type in ('fmctr') then 'fmctr'
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 ('pgc','hotspot') 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 ('fmctr') then 'fmctr'
END AS recommend_type,
card_id,
app_session_id
......@@ -79,21 +77,19 @@ FROM
AND is_exposure = '1' ----精准曝光
AND page_name ='home'
AND tab_name = '精选'
AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr')
or (transaction_type in ('ctr','cvr','ctcvr') and card_content_type in ('qa','answer','user_post')))
AND (transaction_type in ('-1','smr','hotspot','pgc','newdata','hotspot_feed')
or transaction_type like '%ctr' or transaction_type like '%cvr')
AND card_content_type in ('qa','diary','user_post','answer')
group by partition_date,
case when card_content_type in ('qa','answer') then 'qa' else card_content_type end,
cl_id,
CASE WHEN transaction_type in ('ctr') THEN 'ctr预估'
WHEN transaction_type in ('cvr','ctcvr') THEN 'cvr预估'
CASE when transaction_type in ('fmctr') then 'fmctr'
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 ('pgc','hotspot') 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 ('fmctr') then 'fmctr' END,
when transaction_type in ('hotspot_feed') then 'hotspot_feed' END,
card_id,
app_session_id
)a
......@@ -113,15 +109,13 @@ FROM
SELECT partition_date,
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['transaction_type'] in ('ctr') THEN 'ctr预估'
WHEN params['transaction_type'] in ('cvr','ctcvr') THEN 'cvr预估'
CASE when params['transaction_type'] in ('fmctr') then 'fmctr'
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 ('pgc','hotspot') 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 ('fmctr') then 'fmctr'
END AS recommend_type,
params['card_id'] as card_id,
app_session_id
......@@ -130,21 +124,19 @@ FROM
AND action='on_click_card'
AND params['page_name'] ='home'
AND params['tab_name'] = '精选'
AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','samecity_ctr','samecity_cvr','hotspot_feed','samecity_ctcvr','fmctr')
or (params['transaction_type'] in ('ctr','cvr','ctcvr') and params['card_content_type'] in ('qa','answer','user_post')))
AND (params['transaction_type'] in ('-1','smr','hotspot','pgc','newdata','hotspot_feed')
or params['transaction_type'] like '%ctr' or params['transaction_type'] like '%cvr')
AND params['card_content_type'] in ('qa','diary','user_post','answer')
GROUP BY partition_date,
cl_id,
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预估'
WHEN params['transaction_type'] in ('cvr','ctcvr') THEN 'cvr预估'
CASE when params['transaction_type'] in ('fmctr') then 'fmctr'
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 ('pgc','hotspot') 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 ('fmctr') then 'fmctr' END,
when params['transaction_type'] in ('hotspot_feed') then 'hotspot_feed' END,
params['card_id'],
app_session_id
)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