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
5b5e81b4
Commit
5b5e81b4
authored
Nov 12, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'weiyimin' into 'master'
push codes See merge request
!108
parents
a3bc3d3f
5f587842
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
home_content_retention.sql
pm/daily_content/report/home_content_retention.sql
+5
-1
daily_push.sql
pm/daily_push/etl/daily_push.sql
+1
-1
No files found.
pm/daily_content/report/home_content_retention.sql
View file @
5b5e81b4
select
substr
(
day_id
,
1
,
6
)
`日期`
select
substr
(
day_id
,
1
,
6
)
`日期`
,
device_os_type
`系统`
,
device_os_type
`系统`
,
active_type
`活跃`
,
active_type
`活跃`
...
@@ -10,6 +11,8 @@ select substr(day_id,1,6) `日期`
...
@@ -10,6 +11,8 @@ select substr(day_id,1,6) `日期`
,
concat
(
round
(
avg
(
if
(
no_click_uv_quality
=
0
,
NULL
,
no_click_uv_quality
))
*
100
,
2
),
'%'
)
as
`未点击首页feed卡片设备次留率/全站次留率`
,
concat
(
round
(
avg
(
if
(
no_click_uv_quality
=
0
,
NULL
,
no_click_uv_quality
))
*
100
,
2
),
'%'
)
as
`未点击首页feed卡片设备次留率/全站次留率`
,
concat
(
round
(
avg
(
if
(
home_good_click_retention_quality
=
0
,
NULL
,
home_good_click_retention_quality
))
*
100
,
2
),
'%'
)
as
`当天点击首页feed卡片,且次日依旧点击的次留率/全站次留率`
,
concat
(
round
(
avg
(
if
(
home_good_click_retention_quality
=
0
,
NULL
,
home_good_click_retention_quality
))
*
100
,
2
),
'%'
)
as
`当天点击首页feed卡片,且次日依旧点击的次留率/全站次留率`
FROM
pm
.
tl_pm_content_retention
FROM
pm
.
tl_pm_content_retention
where
partition_day
>=
'20201110'
and
partition_day
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
where
((
partition_day
=
'20201110'
and
day_id
<=
'20201109'
)
or
(
partition_day
>
'20201110'
and
partition_day
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
and
day_id
=
REGEXP_REPLACE
(
date_sub
(
concat_ws
(
'-'
,
substr
(
partition_day
,
1
,
4
),
substr
(
partition_day
,
5
,
2
),
substr
(
partition_day
,
7
,
2
)),
1
),
'-'
,
''
)))
group
by
substr
(
day_id
,
1
,
6
),
device_os_type
,
active_type
,
channel
group
by
substr
(
day_id
,
1
,
6
),
device_os_type
,
active_type
,
channel
order
by
`日期`
,
`系统`
,
`活跃`
,
`渠道`
order
by
`日期`
,
`系统`
,
`活跃`
,
`渠道`
\ No newline at end of file
pm/daily_push/etl/daily_push.sql
View file @
5b5e81b4
...
@@ -493,7 +493,7 @@ FROM
...
@@ -493,7 +493,7 @@ FROM
FROM
FROM
(
(
select
partition_day
select
partition_day
,
device_id
,
msg_id
,
case
when
device_type
=
'android'
then
'android'
else
'ios'
end
as
device_os_type
,
device_id
,
msg_id
from
bl
.
bl_et_bg_trackingpushlog_inc_d
from
bl
.
bl_et_bg_trackingpushlog_inc_d
where
partition_day
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
where
partition_day
=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
group
by
partition_day
,
device_id
,
msg_id
group
by
partition_day
,
device_id
,
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