AND page_name in ('search_result_more','search_result_welfare'))
AND page_name in ('search_result_more','search_result_welfare'))
or (action = 'goto_welfare_detail' AND params ['from'] = 'search_result_welfare_recommend')
or (action = 'goto_welfare_detail' AND params ['from'] = 'search_result_welfare_recommend')
or (action = 'on_click_card' AND params['card_content_type'] in ('service') AND page_name in ('search_result_more','search_result_welfare')))
or (action = 'on_click_card' AND params['card_content_type'] in ('service') AND page_name in ('search_result_more','search_result_welfare')))
UNION ALL
SELECT * FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= '{partition_day}'
AND partition_date < '{end_date}'
AND ((action in ('on_click_topic_card','on_click_diary_card','search_result_click_infomation_item')
AND page_name in ('search_result_more','search_result_diary','search_result_post'))
or (action = 'on_click_card' AND params['card_content_type'] in ('answer','diary') AND page_name in ('search_result_more','search_result_diary','search_result_question_answer')))