Commit 5c874590 authored by 魏艺敏's avatar 魏艺敏

update codes

parent d94caf39
...@@ -64,8 +64,8 @@ FROM ...@@ -64,8 +64,8 @@ FROM
( (
SELECT partition_date,cl_id,'美购详情页' as type SELECT partition_date,cl_id,'美购详情页' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='page_view' AND action='page_view'
)pv )pv
...@@ -88,8 +88,8 @@ FROM ...@@ -88,8 +88,8 @@ FROM
SELECT partition_date,cl_id, '加购物车' as type SELECT partition_date,cl_id, '加购物车' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='welfare_multiattribute_click_add' AND action='welfare_multiattribute_click_add'
...@@ -97,8 +97,8 @@ FROM ...@@ -97,8 +97,8 @@ FROM
SELECT partition_date,cl_id, '右上角购物车' as type SELECT partition_date,cl_id, '右上角购物车' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_navbar_cart' AND action='on_click_navbar_cart'
...@@ -106,7 +106,7 @@ FROM ...@@ -106,7 +106,7 @@ FROM
--点击查看更多评论 --点击查看更多评论
SELECT partition_date,cl_id, '评价列表页' as type SELECT partition_date,cl_id, '评价列表页' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_comment' AND action='welfare_detail_click_comment'
...@@ -115,7 +115,7 @@ FROM ...@@ -115,7 +115,7 @@ FROM
--点击外显的评价标签 --点击外显的评价标签
SELECT partition_date,cl_id, '评价列表页' as type SELECT partition_date,cl_id, '评价列表页' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='service_comment_click_tag' AND action='service_comment_click_tag'
...@@ -124,7 +124,7 @@ FROM ...@@ -124,7 +124,7 @@ FROM
--点击外显的日记卡片 --点击外显的日记卡片
SELECT partition_date,cl_id, '评价列表页' as type SELECT partition_date,cl_id, '评价列表页' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='welfare_detail_comment_click_diary_card' AND action='welfare_detail_comment_click_diary_card'
...@@ -133,7 +133,7 @@ FROM ...@@ -133,7 +133,7 @@ FROM
SELECT partition_date,cl_id, '立即支付' as type SELECT partition_date,cl_id, '立即支付' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='welfare_multiattribute_click_buy' AND action='welfare_multiattribute_click_buy'
...@@ -142,7 +142,7 @@ FROM ...@@ -142,7 +142,7 @@ FROM
--点击选择更美项目 --点击选择更美项目
SELECT partition_date,cl_id, '选择美购项目' as type SELECT partition_date,cl_id, '选择美购项目' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_button' AND action='on_click_button'
...@@ -152,7 +152,7 @@ FROM ...@@ -152,7 +152,7 @@ FROM
--7.22新版本--点击外露的美购项目 --7.22新版本--点击外露的美购项目
SELECT partition_date,cl_id, '选择美购项目' as type SELECT partition_date,cl_id, '选择美购项目' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_button' AND action='on_click_button'
...@@ -162,7 +162,7 @@ FROM ...@@ -162,7 +162,7 @@ FROM
--7.22新版本--点击查看更多 --7.22新版本--点击查看更多
SELECT partition_date,cl_id, '选择美购项目' as type SELECT partition_date,cl_id, '选择美购项目' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_button' AND action='on_click_button'
...@@ -172,7 +172,7 @@ FROM ...@@ -172,7 +172,7 @@ FROM
--点击私信按钮 --点击私信按钮
SELECT partition_date,cl_id, '私信及电话咨询' as type SELECT partition_date,cl_id, '私信及电话咨询' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_message' AND action='welfare_detail_click_message'
...@@ -181,7 +181,7 @@ FROM ...@@ -181,7 +181,7 @@ FROM
--7.20之后灰度上线的快捷咨询按钮和预约面诊按钮 --7.20之后灰度上线的快捷咨询按钮和预约面诊按钮
SELECT partition_date,cl_id, '私信及电话咨询' as type SELECT partition_date,cl_id, '私信及电话咨询' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_button' AND action='on_click_button'
...@@ -191,7 +191,7 @@ FROM ...@@ -191,7 +191,7 @@ FROM
--点击机构下面的在线咨询和电话咨询 --点击机构下面的在线咨询和电话咨询
SELECT partition_date,cl_id, '私信及电话咨询' as type SELECT partition_date,cl_id, '私信及电话咨询' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_curearea_contact' AND action='welfare_detail_click_curearea_contact'
...@@ -201,7 +201,7 @@ FROM ...@@ -201,7 +201,7 @@ FROM
SELECT partition_date,cl_id, '机构主页' as type SELECT partition_date,cl_id, '机构主页' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_curearea' AND action='welfare_detail_click_curearea'
...@@ -211,7 +211,7 @@ FROM ...@@ -211,7 +211,7 @@ FROM
SELECT partition_date,cl_id, '机构的其他美购' as type SELECT partition_date,cl_id, '机构的其他美购' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_seller_service_item' AND action='welfare_detail_click_seller_service_item'
...@@ -220,7 +220,7 @@ FROM ...@@ -220,7 +220,7 @@ FROM
SELECT partition_date,cl_id, '机构导航' as type SELECT partition_date,cl_id, '机构导航' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_address' AND action='welfare_detail_click_address'
...@@ -229,7 +229,7 @@ FROM ...@@ -229,7 +229,7 @@ FROM
SELECT partition_date,cl_id, '推荐美购' as type SELECT partition_date,cl_id, '推荐美购' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date <regexp_replace((current_date),'-','') AND partition_date <regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_card' AND action='on_click_card'
...@@ -240,7 +240,7 @@ FROM ...@@ -240,7 +240,7 @@ FROM
SELECT partition_date,cl_id, '收藏' as type SELECT partition_date,cl_id, '收藏' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_favor' AND action='on_click_favor'
...@@ -251,7 +251,7 @@ FROM ...@@ -251,7 +251,7 @@ FROM
SELECT partition_date,cl_id, '医生主页' as type SELECT partition_date,cl_id, '医生主页' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_curearea' AND action='welfare_detail_click_curearea'
...@@ -261,7 +261,7 @@ FROM ...@@ -261,7 +261,7 @@ FROM
SELECT partition_date,cl_id, '分享' as type SELECT partition_date,cl_id, '分享' as type
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='page_click_share' AND action='page_click_share'
...@@ -289,7 +289,7 @@ FROM ...@@ -289,7 +289,7 @@ FROM
FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d
WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a
ON m.device_id = a.device_id ON m.device_id = a.device_id
where partition_date>=regexp_replace(DATE_SUB(current_date,60) ,'-','') where partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date<regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
......
...@@ -199,7 +199,7 @@ FROM ...@@ -199,7 +199,7 @@ FROM
( (
SELECT partition_date,page_name,cl_id SELECT partition_date,page_name,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >=regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='page_view' AND action='page_view'
...@@ -227,7 +227,7 @@ FROM ...@@ -227,7 +227,7 @@ FROM
FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d
WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a
ON m.device_id = a.device_id ON m.device_id = a.device_id
where partition_date>=regexp_replace(DATE_SUB(current_date,60) ,'-','') where partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date<regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
...@@ -288,7 +288,7 @@ FROM ...@@ -288,7 +288,7 @@ FROM
( (
SELECT partition_date,referrer,cl_id SELECT partition_date,referrer,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='page_view' AND action='page_view'
...@@ -316,7 +316,7 @@ FROM ...@@ -316,7 +316,7 @@ FROM
FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d
WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a
ON m.device_id = a.device_id ON m.device_id = a.device_id
where partition_date>=regexp_replace(DATE_SUB(current_date,60) ,'-','') where partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date<regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
...@@ -414,7 +414,7 @@ FROM ...@@ -414,7 +414,7 @@ FROM
( --点击加车/支付 ( --点击加车/支付
SELECT partition_date,referrer,action,cl_id SELECT partition_date,referrer,action,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >=regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action in ('welfare_multiattribute_click_add','welfare_multiattribute_click_buy') AND action in ('welfare_multiattribute_click_add','welfare_multiattribute_click_buy')
...@@ -423,7 +423,7 @@ FROM ...@@ -423,7 +423,7 @@ FROM
--点击私信按钮 --点击私信按钮
SELECT partition_date,referrer,action,cl_id SELECT partition_date,referrer,action,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >=regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_message' AND action='welfare_detail_click_message'
...@@ -439,7 +439,7 @@ FROM ...@@ -439,7 +439,7 @@ FROM
( SELECT partition_date,params['referrer_link'] as referrer_link,cl_id,action ( SELECT partition_date,params['referrer_link'] as referrer_link,cl_id,action
,json_split(params['referrer_link'],'string') as a ,json_split(params['referrer_link'],'string') as a
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_button' AND action='on_click_button'
...@@ -473,7 +473,7 @@ FROM ...@@ -473,7 +473,7 @@ FROM
FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d
WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a
ON m.device_id = a.device_id ON m.device_id = a.device_id
where partition_date>=regexp_replace(DATE_SUB(current_date,60) ,'-','') where partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date<regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
......
...@@ -193,7 +193,7 @@ FROM ...@@ -193,7 +193,7 @@ FROM
( (
SELECT partition_date,page_name,cl_id SELECT partition_date,page_name,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >=regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='page_view' AND action='page_view'
...@@ -221,7 +221,7 @@ FROM ...@@ -221,7 +221,7 @@ FROM
FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d
WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a
ON m.device_id = a.device_id ON m.device_id = a.device_id
where partition_date>=regexp_replace(DATE_SUB(current_date,60) ,'-','') where partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date<regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
...@@ -282,7 +282,7 @@ FROM ...@@ -282,7 +282,7 @@ FROM
( (
SELECT partition_date,referrer,cl_id SELECT partition_date,referrer,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='page_view' AND action='page_view'
...@@ -310,7 +310,7 @@ FROM ...@@ -310,7 +310,7 @@ FROM
FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d
WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a
ON m.device_id = a.device_id ON m.device_id = a.device_id
where partition_date>=regexp_replace(DATE_SUB(current_date,60) ,'-','') where partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date<regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
...@@ -408,7 +408,7 @@ FROM ...@@ -408,7 +408,7 @@ FROM
( --点击加车/支付 ( --点击加车/支付
SELECT partition_date,referrer,action,cl_id SELECT partition_date,referrer,action,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >=regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action in ('welfare_multiattribute_click_add','welfare_multiattribute_click_buy') AND action in ('welfare_multiattribute_click_add','welfare_multiattribute_click_buy')
...@@ -417,7 +417,7 @@ FROM ...@@ -417,7 +417,7 @@ FROM
--点击私信按钮 --点击私信按钮
SELECT partition_date,referrer,action,cl_id SELECT partition_date,referrer,action,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >=regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
--AND page_name = 'welfare_detail' --AND page_name = 'welfare_detail'
AND action='welfare_detail_click_message' AND action='welfare_detail_click_message'
...@@ -433,7 +433,7 @@ FROM ...@@ -433,7 +433,7 @@ FROM
( SELECT partition_date,params['referrer_link'] as referrer_link,cl_id,action ( SELECT partition_date,params['referrer_link'] as referrer_link,cl_id,action
,json_split(params['referrer_link'],'string') as a ,json_split(params['referrer_link'],'string') as a
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date >= regexp_replace((current_date - interval '90' day),'-','') WHERE partition_date >= regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date < regexp_replace((current_date),'-','') AND partition_date < regexp_replace((current_date),'-','')
AND page_name = 'welfare_detail' AND page_name = 'welfare_detail'
AND action='on_click_button' AND action='on_click_button'
...@@ -467,7 +467,7 @@ FROM ...@@ -467,7 +467,7 @@ FROM
FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d FROM al.al_pm_ct_dv_deviceappversionrollbackfrom20200101_d
WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a WHERE partition_day = regexp_replace(DATE_SUB(current_date,2) ,'-',''))a
ON m.device_id = a.device_id ON m.device_id = a.device_id
where partition_date>=regexp_replace(DATE_SUB(current_date,60) ,'-','') where partition_date>=regexp_replace(DATE_SUB(current_date,90) ,'-','')
AND partition_date<regexp_replace((current_date),'-','') AND partition_date<regexp_replace((current_date),'-','')
AND active_type in ('1','2','4') AND active_type in ('1','2','4')
and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3' and first_channel_source_type not in ('yqxiu1','yqxiu2','yqxiu3','yqxiu4','yqxiu5','mxyc1','mxyc2','mxyc3'
......
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