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
5976d8a2
Commit
5976d8a2
authored
Aug 04, 2020
by
yindanlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fangan_day report codes
parent
ea59c8ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
fangan_day.sql
pm/fangan_day/etl/fangan_day.sql
+4
-3
No files found.
pm/fangan_day/etl/fangan_day.sql
View file @
5976d8a2
...
...
@@ -46,9 +46,10 @@ FROM
or
(
partition_date
>=
'20200728'
AND
substr
(
convup
(
sha1
(
device_id
),
16
,
10
),
-
1
)
in
(
'0'
,
'1'
,
'2'
,
'3'
,
'4'
))
THEN
'测试组A(方案库)'
else
'测试组B(无方案库)'
END
as
grey_type
,
CASE
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%'
)))
THEN
'AI'
ELSE
'医美'
END
as
channel_type
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%'
)
or
(
first_channel_source_type
like
'dyand%'
)
or
(
first_channel_source_type
like
'douyin%'
)
or
(
first_channel_source_type
like
'aiqiyiand%'
)
or
(
first_channel_source_type
like
'bilibili%'
)
or
(
first_channel_source_type
like
'kuaishou%'
)))
THEN
'AI'
ELSE
'医美'
END
as
channel_type
FROM
online
.
ml_device_day_active_status
LEFT
JOIN
(
SELECT
col1
,
col2
--col1:子渠道,col2:是否属于AI,col3:标识
...
...
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