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
010cbfec
Commit
010cbfec
authored
Aug 24, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push codes
parent
04a89108
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
create_clue_daily.sql
pm/clue_daily/etl/create_clue_daily.sql
+3
-1
clue_by_channel.sql
pm/wel_clue_by_channel/report/clue_by_channel.sql
+3
-3
welfare_by_channel.sql
pm/wel_clue_by_channel/report/welfare_by_channel.sql
+3
-3
No files found.
pm/clue_daily/etl/create_clue_daily.sql
View file @
010cbfec
...
...
@@ -21,7 +21,9 @@ CREATE TABLE IF NOT EXISTS pm.tl_pm_userclue_d
active_type
string
comment
'{"chs_name":"活跃类型","description":"","etl":"","value":"","remark":""}'
,
grey_type
string
comment
'{"chs_name":"灰度类型","description":"","etl":"","value":"","remark":""}'
,
dau
bigint
comment
'{"chs_name":"dau(不去除积分墙)","description":"","etl":"","value":"","remark":""}'
,
user_num
bigint
comment
'{"chs_name":"注册的用户数","description":"","etl":"","value":"","remark":""}'
,
total_valid_dev
bigint
comment
'{"chs_name":"总有效咨询设备","description":"","etl":"","value":"","remark":""}'
,
total_valid_num
bigint
comment
'{"chs_name":"总有效线索","description":"","etl":"","value":"","remark":""}'
,
msg_num
bigint
comment
'{"chs_name":"私信咨询人次-总计","description":"","etl":"","value":"","remark":""}'
,
msg_dev
bigint
comment
'{"chs_name":"私信咨询设备数-总计","description":"","etl":"","value":"","remark":""}'
,
msg_num
bigint
comment
'{"chs_name":"私信咨询人次-总计","description":"","etl":"","value":"","remark":""}'
,
valid_msg_dev
bigint
comment
'{"chs_name":"有效私信咨询设备数-总计","description":"","etl":"","value":"","remark":""}'
,
...
...
pm/wel_clue_by_channel/report/clue_by_channel.sql
View file @
010cbfec
...
...
@@ -3,9 +3,9 @@ SELECT
,
channel
as
`渠道`
,
device_os_type
as
`平台`
,
COUNT
(
DISTINCT
device
.
device_id
)
AS
`当天新活量`
,
SUM
(
IF
(
valid
.
date_day
=
device
.
first_active_date
,
valid
.
clue_num
,
NULL
))
AS
validUV_1
,
SUM
(
IF
(
valid
.
date_day
>=
device
.
first_active_date
AND
valid
.
date_day
<=
date_add
(
device
.
first_active_date
,
2
),
valid
.
clue_num
,
NULL
))
AS
validUV_3
,
SUM
(
IF
(
valid
.
date_day
>=
device
.
first_active_date
AND
valid
.
date_day
<=
date_add
(
device
.
first_active_date
,
6
),
valid
.
clue_num
,
NULL
))
AS
validUV_7
,
nvl
(
SUM
(
IF
(
valid
.
date_day
=
device
.
first_active_date
,
valid
.
clue_num
,
NULL
)),
0
)
AS
`当天有效线索`
,
nvl
(
SUM
(
IF
(
valid
.
date_day
>=
device
.
first_active_date
AND
valid
.
date_day
<=
date_add
(
device
.
first_active_date
,
2
),
valid
.
clue_num
,
NULL
)),
0
)
AS
`3日内有效线索`
,
nvl
(
SUM
(
IF
(
valid
.
date_day
>=
device
.
first_active_date
AND
valid
.
date_day
<=
date_add
(
device
.
first_active_date
,
6
),
valid
.
clue_num
,
NULL
)),
0
)
AS
`7日内有效线索`
FROM
(
SELECT
...
...
pm/wel_clue_by_channel/report/welfare_by_channel.sql
View file @
010cbfec
...
...
@@ -3,9 +3,9 @@ SELECT
,
channel
as
`渠道`
,
device_os_type
as
`平台`
,
COUNT
(
DISTINCT
device
.
device_id
)
AS
`当天新活量`
,
SUM
(
IF
(
pv
.
action_date
=
device
.
first_active_date
,
pv
.
wel_pv
,
NULL
))
AS
meigouPV_1
,
SUM
(
IF
(
pv
.
action_date
>=
device
.
first_active_date
AND
pv
.
action_date
<=
date_add
(
device
.
first_active_date
,
2
),
pv
.
wel_pv
,
NULL
))
AS
meigouPV_3
,
SUM
(
IF
(
pv
.
action_date
>=
device
.
first_active_date
AND
pv
.
action_date
<=
date_add
(
device
.
first_active_date
,
6
),
pv
.
wel_pv
,
NULL
))
AS
meigouPV_7
,
nvl
(
SUM
(
IF
(
pv
.
action_date
=
device
.
first_active_date
,
pv
.
wel_pv
,
NULL
)),
0
)
AS
`当日核心页pv`
,
nvl
(
SUM
(
IF
(
pv
.
action_date
>=
device
.
first_active_date
AND
pv
.
action_date
<=
date_add
(
device
.
first_active_date
,
2
),
pv
.
wel_pv
,
NULL
)),
0
)
AS
`3日内核心页pv`
,
nvl
(
SUM
(
IF
(
pv
.
action_date
>=
device
.
first_active_date
AND
pv
.
action_date
<=
date_add
(
device
.
first_active_date
,
6
),
pv
.
wel_pv
,
NULL
)),
0
)
AS
`7日内核心页pv`
FROM
(
SELECT
...
...
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