Commit bfd79938 authored by 魏艺敏's avatar 魏艺敏

push codes

parent 9828d211
SET mapreduce.job.queuename=data;
--美购详情页的分发 --美购详情页的分发
SELECT `日期`,`设备类型`,`活跃类型`,`渠道` SELECT `日期`,`设备类型`,`活跃类型`,`渠道`
,`美购详情页浏览pv` ,`美购详情页浏览pv`
...@@ -76,8 +78,8 @@ FROM ...@@ -76,8 +78,8 @@ FROM
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on pv.cl_id=spam_pv.cl_id on pv.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
UNION ALL UNION ALL
......
...@@ -76,8 +76,8 @@ FROM ...@@ -76,8 +76,8 @@ FROM
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on uv.cl_id=spam_pv.cl_id on uv.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
UNION ALL UNION ALL
......
...@@ -250,8 +250,8 @@ FROM ...@@ -250,8 +250,8 @@ FROM
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on t1.cl_id=spam_pv.cl_id on t1.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
)t1 )t1
LATERAL VIEW explode(t1.channel) t2 AS channel LATERAL VIEW explode(t1.channel) t2 AS channel
GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel
...@@ -334,8 +334,8 @@ LEFT JOIN ...@@ -334,8 +334,8 @@ LEFT JOIN
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on t1.cl_id=spam_pv.cl_id on t1.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
)t1 )t1
LATERAL VIEW explode(t1.channel) t2 AS channel LATERAL VIEW explode(t1.channel) t2 AS channel
GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel
...@@ -486,8 +486,8 @@ LEFT JOIN ...@@ -486,8 +486,8 @@ LEFT JOIN
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on t1.cl_id=spam_pv.cl_id on t1.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
)t1 )t1
LATERAL VIEW explode(t1.channel) t2 AS channel LATERAL VIEW explode(t1.channel) t2 AS channel
GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel
......
...@@ -244,8 +244,8 @@ FROM ...@@ -244,8 +244,8 @@ FROM
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on t1.cl_id=spam_pv.cl_id on t1.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
)t1 )t1
LATERAL VIEW explode(t1.channel) t2 AS channel LATERAL VIEW explode(t1.channel) t2 AS channel
GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel
...@@ -328,8 +328,8 @@ LEFT JOIN ...@@ -328,8 +328,8 @@ LEFT JOIN
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on t1.cl_id=spam_pv.cl_id on t1.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
)t1 )t1
LATERAL VIEW explode(t1.channel) t2 AS channel LATERAL VIEW explode(t1.channel) t2 AS channel
GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel
...@@ -480,8 +480,8 @@ LEFT JOIN ...@@ -480,8 +480,8 @@ LEFT JOIN
FROM ml.ml_d_ct_dv_devicespam_d FROM ml.ml_d_ct_dv_devicespam_d
WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','') WHERE partition_day=regexp_replace(DATE_SUB(current_date,1) ,'-','')
)spam_pv )spam_pv
on t1.cl_id=spam_pv.cl_id on t1.cl_id=spam_pv.device_id
WHERE spam_pv.cl_id IS NULL WHERE spam_pv.device_id IS NULL
)t1 )t1
LATERAL VIEW explode(t1.channel) t2 AS channel LATERAL VIEW explode(t1.channel) t2 AS channel
GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel GROUP BY t1.partition_date,t1.device_type,t1.active_type,t2.channel
......
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