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

update codes

parent 209db750
...@@ -98,9 +98,9 @@ FROM ...@@ -98,9 +98,9 @@ FROM
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -166,9 +166,9 @@ LEFT JOIN ...@@ -166,9 +166,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -259,9 +259,9 @@ LEFT JOIN ...@@ -259,9 +259,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -338,9 +338,9 @@ LEFT JOIN ...@@ -338,9 +338,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -429,9 +429,9 @@ LEFT JOIN ...@@ -429,9 +429,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -541,9 +541,9 @@ LEFT JOIN ...@@ -541,9 +541,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -676,9 +676,9 @@ LEFT JOIN ...@@ -676,9 +676,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -871,9 +871,9 @@ LEFT JOIN ...@@ -871,9 +871,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
...@@ -1068,9 +1068,9 @@ LEFT JOIN ...@@ -1068,9 +1068,9 @@ LEFT JOIN
,case WHEN active_type = '4' THEN '老活跃设备' ,case WHEN active_type = '4' THEN '老活跃设备'
WHEN active_type in ('1','2') then '新增设备' END as active_type WHEN active_type in ('1','2') then '新增设备' END as active_type
,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL ,array(CASE WHEN first_channel_source_type like '%xinyouxingkong%' or a.device_id is not NULL
or first_channel_source_type in ('promotion_aisi','promotion_jingmeng_jingmeng01','promotion_koomobi_km00','promotion_koomobi_km01' or first_channel_source_type in ('promotion_aisi','promotion_koomobi_km00','promotion_koomobi_km01')
,'promotion_longyuzhixing_lyzx01','promotion_longyuzhixing_seedpi','promotion_longyuzhixing_lyzx04','promotion_longyuzhixing_lyzx06' or first_channel_source_type like '%longyuzhixing%' or first_channel_source_type like '%longyuzhixing%'
,'promotion_mailuo_mailuo01','promotion_mailuo_mailuo03') THEN '可疑' or first_channel_source_type like '%mailuo%' THEN '可疑'
WHEN (partition_date>='20190601' and tmp.col2 = 'AI') WHEN (partition_date>='20190601' and tmp.col2 = 'AI')
or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%') or (partition_date < '20200301' AND partition_date>='20190601' and first_channel_source_type like 'promotion_toutiao_jy%')
or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%'))) or (partition_date>='20200601' and ((first_channel_source_type like 'promotion_toutiao_jy%') or (first_channel_source_type like 'dyand%') or (first_channel_source_type like 'douyin%')))
......
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