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
35f43511
Commit
35f43511
authored
Aug 23, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push codes
parent
d9e41c24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
clue_by_channel.sql
pm/wel_clue_by_channel/report/clue_by_channel.sql
+1
-1
welfare_by_channel.sql
pm/wel_clue_by_channel/report/welfare_by_channel.sql
+3
-2
No files found.
pm/wel_clue_by_channel/report/clue_by_channel.sql
View file @
35f43511
...
...
@@ -144,7 +144,7 @@ SELECT
)
t1
JOIN
(
SELECT
user_id
,
partition_date
,
if
(
size
(
t
.
device_list
)
>
0
,
device_list
[
0
],
''
)
device_id
SELECT
user_id
,
partition_date
,
if
(
size
(
device_list
)
>
0
,
device_list
[
0
],
''
)
device_id
FROM
online
.
ml_user_updates
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
...
...
pm/wel_clue_by_channel/report/welfare_by_channel.sql
View file @
35f43511
...
...
@@ -51,7 +51,8 @@ SELECT
(
SELECT
concat_ws
(
'-'
,
substr
(
partition_date
,
0
,
4
),
substr
(
partition_date
,
5
,
2
),
substr
(
partition_date
,
7
,
2
))
AS
action_date
,
cl_id
FROM
online
.
bl_hdfs_maidian_updates
WHERE
partition_date
>=
'${start_date}'
AND
partition_date
<
'${end_date}'
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
AND
page_name
in
(
'welfare_detail'
,
'organization_detail'
,
'expert_detail'
)
AND
action
=
'page_view'
)
a
...
...
@@ -59,7 +60,7 @@ SELECT
(
-- 2.去掉疑似机构刷量的PV和UV
SELECT
device_id
FROM
ml
.
ml_d_ct_dv_devicespam_d
WHERE
partition_day
=
'${partition_date}'
WHERE
partition_day
=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
)
spam_pv
on
a
.
cl_id
=
spam_pv
.
device_id
WHERE
spam_pv
.
device_id
IS
NULL
...
...
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