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
72573d08
Commit
72573d08
authored
Sep 29, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'weiyimin' into 'master'
push codes See merge request
!71
parents
8a9a25a6
2fbc19ed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
daily_push.sql
pm/daily_push/etl/daily_push.sql
+11
-11
No files found.
pm/daily_push/etl/daily_push.sql
View file @
72573d08
...
...
@@ -197,8 +197,8 @@ FROM
count
(
distinct
case
when
push_type
in
(
'106'
,
'107'
,
'108'
)
then
a
.
message_id
end
)
as
will_push_open_pv
,
--意愿push
count
(
distinct
case
when
push_type
in
(
'25'
)
then
a
.
message_id
end
)
as
sign_push_open_pv
,
--签到push
count
(
distinct
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
)
then
a
.
message_id
end
)
as
xitong_push_open_pv
,
--系统push
count
(
distinct
case
when
push_type
in
(
'93'
,
'94'
)
then
a
.
message_id
end
)
as
AI_push_open_pv
,
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
message_id
end
)
as
xitong_push_open_pv
,
--系统push
count
(
distinct
case
when
push_type
in
(
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
message_id
end
)
as
AI_push_open_pv
,
count
(
distinct
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
)
then
a
.
message_id
end
)
as
auto_push_open_pv
--自动push
FROM
(
...
...
@@ -232,7 +232,7 @@ FROM
(
select
msg_id
,
push_type
,
time_stamp
from
online
.
tl_hdfs_push2_new_view
--增量表
where
partition_date
>=
'20190801'
AND
partition_date
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
where
partition_date
>=
regexp_replace
(
DATE_SUB
(
current_date
,
7
)
,
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
group
by
msg_id
,
push_type
,
time_stamp
)
a
left
join
...
...
@@ -267,8 +267,8 @@ FROM
count
(
distinct
case
when
push_type
in
(
'106'
,
'107'
,
'108'
)
then
a
.
app_session_id
end
)
as
will_push_open_2_pv
,
--意愿push
count
(
distinct
case
when
push_type
in
(
'25'
)
then
a
.
app_session_id
end
)
as
sign_push_open_2_pv
,
--签到push
count
(
distinct
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
)
then
a
.
app_session_id
end
)
as
xitong_push_open_2_pv
,
--系统push
count
(
distinct
case
when
push_type
in
(
'93'
,
'94'
)
then
a
.
app_session_id
end
)
as
AI_push_open_2_pv
,
--签到push
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
app_session_id
end
)
as
xitong_push_open_2_pv
,
--系统push
count
(
distinct
case
when
push_type
in
(
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
app_session_id
end
)
as
AI_push_open_2_pv
,
--签到push
count
(
distinct
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
)
then
a
.
app_session_id
end
)
as
auto_push_open_2_pv
--自动push
FROM
(
...
...
@@ -302,7 +302,7 @@ FROM
(
select
msg_id
,
push_type
,
time_stamp
from
online
.
tl_hdfs_push2_new_view
--增量表
where
partition_date
>=
'20190801'
AND
partition_date
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
where
partition_date
>=
regexp_replace
(
DATE_SUB
(
current_date
,
7
)
,
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
group
by
msg_id
,
push_type
,
time_stamp
)
a
left
join
...
...
@@ -378,8 +378,8 @@ full join
,
count
(
distinct
case
when
push_type
in
(
'106'
,
'107'
,
'108'
)
then
a
.
device_id
end
)
as
will_receive_uv
--意愿push
,
count
(
distinct
case
when
push_type
in
(
'25'
)
then
a
.
device_id
end
)
as
sign_receive_uv
--签到push
,
count
(
distinct
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
)
then
a
.
device_id
end
)
as
xitong_receive_uv
--系统push
,
count
(
distinct
case
when
push_type
in
(
'93'
,
'94'
)
then
a
.
device_id
end
)
as
AI_receive_uv
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
device_id
end
)
as
xitong_receive_uv
--系统push
,
count
(
distinct
case
when
push_type
in
(
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
device_id
end
)
as
AI_receive_uv
,
count
(
distinct
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
)
then
a
.
device_id
end
)
as
auto_receive_uv
--自动push
,
count
(
a
.
device_id
)
as
push_receive_pv
,
count
(
case
when
push_type
in
(
'70'
,
'71'
)
then
a
.
device_id
end
)
as
op_receive_pv
--运营push push_type in ('70','71')
...
...
@@ -391,8 +391,8 @@ full join
,
count
(
case
when
push_type
in
(
'106'
,
'107'
,
'108'
)
then
a
.
device_id
end
)
as
will_receive_pv
--意愿push
,
count
(
case
when
push_type
in
(
'25'
)
then
a
.
device_id
end
)
as
sign_receive_pv
--签到push
,
count
(
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
)
then
a
.
device_id
end
)
as
xitong_receive_pv
--系统push
,
count
(
case
when
push_type
in
(
'93'
,
'94'
)
then
a
.
device_id
end
)
as
AI_receive_pv
and
push_type
not
in
(
'70'
,
'71'
,
'101'
,
'102'
,
'103'
,
'104'
,
'105'
,
'111'
,
'112'
,
'113'
,
'106'
,
'107'
,
'108'
,
'25'
,
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
device_id
end
)
as
xitong_receive_pv
--系统push
,
count
(
case
when
push_type
in
(
'93'
,
'94'
,
'95'
,
'96'
)
then
a
.
device_id
end
)
as
AI_receive_pv
,
count
(
case
when
push_type
is
not
null
and
push_type
not
in
(
'70'
,
'71'
)
then
a
.
device_id
end
)
as
auto_receive_pv
--自动push
FROM
...
...
@@ -445,7 +445,7 @@ full join
(
select
msg_id
,
push_type
,
time_stamp
from
online
.
tl_hdfs_push2_new_view
--增量表
where
partition_date
>=
'20190801'
AND
partition_date
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
where
partition_date
>=
regexp_replace
(
DATE_SUB
(
current_date
,
7
)
,
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
group
by
msg_id
,
push_type
,
time_stamp
)
c
on
a
.
msg_id
=
c
.
msg_id
...
...
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