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
b9fd6c02
Commit
b9fd6c02
authored
Jul 22, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push codes
parent
ca7669e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
daily_recommend_strategy.sql
pm/daily_recommend_strategy/etl/daily_recommend_strategy.sql
+8
-4
No files found.
pm/daily_recommend_strategy/etl/daily_recommend_strategy.sql
View file @
b9fd6c02
...
...
@@ -66,6 +66,7 @@ FROM
when
transaction_type
in
(
'newdata'
)
then
'保量卡片'
when
transaction_type
in
(
'samecity_ctr'
)
then
'samecity_ctr'
when
transaction_type
in
(
'samecity_cvr'
)
then
'samecity_cvr'
when
transaction_type
in
(
'hotspot_feed'
)
then
'hotspot_feed'
END
AS
recommend_type
,
card_id
,
app_session_id
...
...
@@ -75,7 +76,7 @@ FROM
AND
is_exposure
=
'1'
----精准曝光
AND
page_name
=
'home'
AND
tab_name
=
'精选'
AND
transaction_type
in
(
'-1'
,
'ctr'
,
'smr'
,
'cvr'
,
'hotspot'
,
'pgc'
,
'newdata'
,
'samecity_ctr'
,
'samecity_cvr'
)
AND
transaction_type
in
(
'-1'
,
'ctr'
,
'smr'
,
'cvr'
,
'hotspot'
,
'pgc'
,
'newdata'
,
'samecity_ctr'
,
'samecity_cvr'
,
'hotspot_feed'
)
AND
card_content_type
in
(
'qa'
,
'diary'
,
'user_post'
,
'answer'
)
group
by
partition_date
,
case
when
card_content_type
in
(
'qa'
,
'answer'
)
then
'qa'
else
card_content_type
end
,
...
...
@@ -86,7 +87,8 @@ FROM
when
transaction_type
in
(
'pgc'
,
'hotspot'
)
then
'热点卡片'
when
transaction_type
in
(
'newdata'
)
then
'保量卡片'
when
transaction_type
in
(
'samecity_ctr'
)
then
'samecity_ctr'
when
transaction_type
in
(
'samecity_cvr'
)
then
'samecity_cvr'
END
,
when
transaction_type
in
(
'samecity_cvr'
)
then
'samecity_cvr'
when
transaction_type
in
(
'hotspot_feed'
)
then
'hotspot_feed'
END
,
card_id
,
app_session_id
)
a
...
...
@@ -113,6 +115,7 @@ FROM
when
params
[
'transaction_type'
]
in
(
'newdata'
)
then
'保量卡片'
when
params
[
'transaction_type'
]
in
(
'samecity_ctr'
)
then
'samecity_ctr'
when
params
[
'transaction_type'
]
in
(
'samecity_cvr'
)
then
'samecity_cvr'
when
params
[
'transaction_type'
]
in
(
'hotspot_feed'
)
then
'hotspot_feed'
END
AS
recommend_type
,
params
[
'card_id'
]
as
card_id
,
app_session_id
...
...
@@ -121,7 +124,7 @@ FROM
AND
action
=
'on_click_card'
AND
params
[
'page_name'
]
=
'home'
AND
params
[
'tab_name'
]
=
'精选'
AND
params
[
'transaction_type'
]
in
(
'-1'
,
'ctr'
,
'smr'
,
'cvr'
,
'hotspot'
,
'pgc'
,
'newdata'
,
'samecity_ctr'
,
'samecity_cvr'
)
AND
params
[
'transaction_type'
]
in
(
'-1'
,
'ctr'
,
'smr'
,
'cvr'
,
'hotspot'
,
'pgc'
,
'newdata'
,
'samecity_ctr'
,
'samecity_cvr'
,
'hotspot_feed'
)
AND
params
[
'card_content_type'
]
in
(
'qa'
,
'diary'
,
'user_post'
,
'answer'
)
GROUP
BY
partition_date
,
cl_id
,
...
...
@@ -132,7 +135,8 @@ FROM
when
params
[
'transaction_type'
]
in
(
'pgc'
,
'hotspot'
)
then
'热点卡片'
when
params
[
'transaction_type'
]
in
(
'newdata'
)
then
'保量卡片'
when
params
[
'transaction_type'
]
in
(
'samecity_ctr'
)
then
'samecity_ctr'
when
params
[
'transaction_type'
]
in
(
'samecity_cvr'
)
then
'samecity_cvr'
END
,
when
params
[
'transaction_type'
]
in
(
'samecity_cvr'
)
then
'samecity_cvr'
when
params
[
'transaction_type'
]
in
(
'hotspot_feed'
)
then
'hotspot_feed'
END
,
params
[
'card_id'
],
app_session_id
)
a
...
...
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