Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data
bi-report
Commits
cb2b5d46
Commit
cb2b5d46
authored
Jul 02, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
209db750
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
daily_content_data_insert.sql
sqls/daily_content_data_insert/daily_content_data_insert.sql
+27
-27
No files found.
sqls/daily_content_data_insert/daily_content_data_insert.sql
View file @
cb2b5d46
...
...
@@ -98,9 +98,9 @@ FROM
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'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
,
case
WHEN
active_type
=
'4'
THEN
'老活跃设备'
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
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_jingmeng_jingmeng01'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
,
'promotion_longyuzhixing_lyzx01'
,
'promotion_longyuzhixing_seedpi'
,
'promotion_longyuzhixing_lyzx04'
,
'promotion_longyuzhixing_lyzx06
'
,
'promotion_mailuo_mailuo01'
,
'promotion_mailuo_mailuo03'
)
THEN
'可疑'
or
first_channel_source_type
in
(
'promotion_aisi'
,
'promotion_koomobi_km00'
,
'promotion_koomobi_km01'
)
or
first_channel_source_type
like
'%longyuzhixing%'
or
first_channel_source_type
like
'%longyuzhixing%
'
or
first_channel_source_type
like
'%mailuo%'
THEN
'可疑'
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
>=
'20200601'
and
((
first_channel_source_type
like
'promotion_toutiao_jy%'
)
or
(
first_channel_source_type
like
'dyand%'
)
or
(
first_channel_source_type
like
'douyin%'
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment