Commit 5551d4d4 authored by 郭羽's avatar 郭羽

搜索指标统计

parent f3ed34df
...@@ -100,7 +100,7 @@ for t in range(0, task_days): ...@@ -100,7 +100,7 @@ for t in range(0, task_days):
SELECT partition_day, SELECT partition_day,
device_id, device_id,
count(CASE WHEN card_content_type='service' THEN 1 END) as service_exp_pv, count(CASE WHEN card_content_type='service' THEN 1 END) as service_exp_pv,
count(CASE WHEN card_content_type<>'service' THEN 1 END) as neirong_exp_pv count(CASE WHEN card_content_type='user_post' THEN 1 END) as neirong_exp_pv
FROM FROM
( (
SELECT device_id,partition_day,card_content_type SELECT device_id,partition_day,card_content_type
...@@ -109,9 +109,7 @@ for t in range(0, task_days): ...@@ -109,9 +109,7 @@ for t in range(0, task_days):
and partition_day < '{end_date}' and partition_day < '{end_date}'
and action in ('page_precise_exposure','home_choiceness_card_exposure') and action in ('page_precise_exposure','home_choiceness_card_exposure')
and is_exposure = '1' and is_exposure = '1'
and page_code in ('search_result_diary','search_result_doctor','search_result_hospital','search_result_more' and page_code in ('search_result_post')
,'search_result_more_infomation','search_result_more_user','search_result_post','search_result_welfare'
,'search_result_wiki','search_result_question_answer')
AND (card_content_type IN ('user_post') or card_type = 'user_post') AND (card_content_type IN ('user_post') or card_type = 'user_post')
)a )a
group by partition_day,card_content_type,device_id group by partition_day,card_content_type,device_id
......
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