Commit 35f43511 authored by 魏艺敏's avatar 魏艺敏

push codes

parent d9e41c24
...@@ -144,7 +144,7 @@ SELECT ...@@ -144,7 +144,7 @@ SELECT
)t1 )t1
JOIN JOIN
( (
SELECT user_id,partition_date,if(size(t.device_list) > 0, device_list [ 0 ], '') device_id SELECT user_id,partition_date,if(size(device_list) > 0, device_list [ 0 ], '') device_id
FROM online.ml_user_updates FROM online.ml_user_updates
WHERE partition_date >= REGEXP_REPLACE(trunc(date_sub(current_date(),1),'MM'),'-','') WHERE partition_date >= REGEXP_REPLACE(trunc(date_sub(current_date(),1),'MM'),'-','')
AND partition_date <=regexp_replace(date_sub(current_date(),1),'-','') AND partition_date <=regexp_replace(date_sub(current_date(),1),'-','')
......
...@@ -51,7 +51,8 @@ SELECT ...@@ -51,7 +51,8 @@ SELECT
( (
SELECT concat_ws('-',substr(partition_date,0,4),substr(partition_date,5,2),substr(partition_date,7,2)) AS action_date,cl_id SELECT concat_ws('-',substr(partition_date,0,4),substr(partition_date,5,2),substr(partition_date,7,2)) AS action_date,cl_id
FROM online.bl_hdfs_maidian_updates FROM online.bl_hdfs_maidian_updates
WHERE partition_date>='${start_date}' AND partition_date<'${end_date}' WHERE partition_date >= REGEXP_REPLACE(trunc(date_sub(current_date(),1),'MM'),'-','')
AND partition_date <=regexp_replace(date_sub(current_date(),1),'-','')
AND page_name in ('welfare_detail','organization_detail','expert_detail') AND page_name in ('welfare_detail','organization_detail','expert_detail')
AND action = 'page_view' AND action = 'page_view'
)a )a
...@@ -59,7 +60,7 @@ SELECT ...@@ -59,7 +60,7 @@ SELECT
( -- 2.去掉疑似机构刷量的PV和UV ( -- 2.去掉疑似机构刷量的PV和UV
SELECT device_id SELECT device_id
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day='${partition_date}' WHERE partition_day=regexp_replace(date_sub(current_date(),1),'-','')
)spam_pv )spam_pv
on a.cl_id=spam_pv.device_id on a.cl_id=spam_pv.device_id
WHERE spam_pv.device_id IS NULL WHERE spam_pv.device_id IS NULL
......
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