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
1b0ab9c5
Commit
1b0ab9c5
authored
Nov 17, 2020
by
edz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push core
parent
02d58744
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
home_daily.sql
pm/core_daily/report/home_daily.sql
+8
-5
No files found.
pm/core_daily/report/home_daily.sql
View file @
1b0ab9c5
...
...
@@ -124,7 +124,7 @@ FROM
and
partition_date
<=
regexp_replace
(
DATE_SUB
(
current_date
,
1
)
,
'-'
,
''
)
and
action
=
'on_click_card'
and
page_name
=
'home'
and
params
[
'card_type'
]
=
'card'
and
params
[
'card_type'
]
in
(
'card'
,
'video'
,
'search_word'
)
group
by
partition_date
,
cl_id
,
params
[
'card_id'
]
...
...
@@ -143,7 +143,8 @@ FROM
and
(
referrer
in
(
'home'
)
or
(
params
[
'referrer_link'
]
like
'%[%'
and
json_split
(
params
[
'referrer_link'
])[
size
(
json_split
(
params
[
'referrer_link'
]))
-
1
]
in
(
'home'
)))
and
page_name
in
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
)
and
(
page_name
in
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
,
'video_steep'
,
'article_detail'
)
or
page_name
like
'search_result_%'
)
group
by
partition_date
,
cl_id
,
params
[
'business_id'
]
...
...
@@ -164,8 +165,9 @@ FROM
and
(
referrer
=
'home'
or
(
params
[
'referrer_link'
]
like
'%[%'
and
json_split
(
params
[
'referrer_link'
])[
size
(
json_split
(
params
[
'referrer_link'
]))
-
1
]
=
'home'
))
and
page_name
in
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
,
'video_steep'
,
'article_detail'
)
and
(
page_name
in
(
'diary_detail'
,
'topic_detail'
,
'post_detail'
,
'user_post_detail'
,
'doctor_post_detail'
,
'question_detail'
,
'answer_detail'
,
'question_answer_detail'
,
'video_steep'
,
'article_detail'
)
or
page_name
like
'search_result_%'
)
--and (params['is_push']=0 or params['is_push'] is null)
)
a
left
join
(
--评论的埋点有缺失,所以用业务库数据来补充
...
...
@@ -224,7 +226,8 @@ FROM
or
(
action
=
'on_click_favor'
and
params
[
'motion'
]
=
'do'
)
--点击收藏
or
action
=
'page_click_share'
--点击分享
or
(
action
=
'on_click_vote'
and
params
[
'motion'
]
=
'vote'
)
--点击点赞
or
b
.
user_id
is
not
null
)
--当天有针对内容的评论
or
b
.
user_id
is
not
null
--当天有针对内容的评论
or
page_name
like
'search_result_%'
and
action
not
in
(
'upload_page'
,
'report_status'
,
'popup_view'
,
'refresh_page'
,
'on_app_session_over'
))
--在搜索结果页有点击行为
group
by
a
.
partition_date
,
a
.
cl_id
,
a
.
business_id
)
t5
on
t4
.
partition_date
=
t5
.
partition_date
and
t4
.
device_id
=
t5
.
cl_id
and
t4
.
card_id
=
t5
.
business_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