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
66a24e90
Commit
66a24e90
authored
Sep 14, 2020
by
魏艺敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push codes
parent
5f06a47e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
en-cn.properties
pm/daily_userpost/en-cn.properties
+2
-2
clue_by_channel.sql
pm/wel_clue_by_channel/report/clue_by_channel.sql
+5
-4
welfare_by_channel.sql
pm/wel_clue_by_channel/report/welfare_by_channel.sql
+2
-2
No files found.
pm/daily_userpost/en-cn.properties
View file @
66a24e90
daily_userpost
=
精华帖日报
\ No newline at end of file
daily_userpost
=
新手精选帖日报
\ No newline at end of file
pm/wel_clue_by_channel/report/clue_by_channel.sql
View file @
66a24e90
...
...
@@ -18,7 +18,7 @@ SELECT
,
first_channel_source_type
,
concat_ws
(
'-'
,
substr
(
partition_date
,
1
,
4
),
substr
(
partition_date
,
5
,
2
),
substr
(
partition_date
,
7
,
2
))
AS
first_active_date
FROM
online
.
ml_device_day_active_status
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
8
),
'MM'
),
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
AND
active_type
in
(
'1'
,
'2'
)
AND
first_channel_source_type
not
in
(
'yqxiu1'
,
'yqxiu2'
,
'yqxiu3'
,
'yqxiu4'
,
'yqxiu5'
,
'mxyc1'
,
'mxyc2'
,
'mxyc3'
...
...
@@ -70,7 +70,7 @@ SELECT
(
SELECT
user_id
,
merchant_id
,
SUBSTR
(
partition_day
,
1
,
6
)
AS
consult_month
,
min
(
partition_day
)
as
first_consult_date
,
1
as
CONSULT_NUM
FROM
ml
.
ml_c_et_msg_conversation_dimen_inc_d
--新仓库私信表
WHERE
partition_day
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
WHERE
partition_day
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
8
),
'MM'
),
'-'
,
''
)
AND
partition_day
<=
regexp_replace
(
date_sub
(
current_date
,
1
),
'-'
,
''
)
and
is_valid
=
'true'
GROUP
BY
user_id
,
merchant_id
,
SUBSTR
(
partition_day
,
1
,
6
)
...
...
@@ -105,7 +105,7 @@ SELECT
SELECT
sub_id
,
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
as
partition_date
FROM
tl
.
tl_gm_sl_ali_virtual_phone_call_detail
--通话记录表,call_type呼叫类型
WHERE
partition_day
=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
8
),
'MM'
),
'-'
,
''
)
AND
REGEXP_REPLACE
(
SUBSTR
(
call_time
,
0
,
10
),
'-'
,
''
)
<=
regexp_replace
(
date_sub
(
current_date
,
1
),
'-'
,
''
)
AND
start_time
<
release_time
--通话时长大于30秒
)
a
...
...
@@ -136,6 +136,7 @@ SELECT
FROM
tl
.
tl_gm_sl_lead_task
--线索任务表(用户点击授权后记入该表)
WHERE
partition_day
=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
AND
source
=
'2'
--用户行为电话授权
and
(
user_id
is
NOT
NULL
or
USER_ID
<>
''
)
)
e
ON
d
.
lead_task_id
=
e
.
id
GROUP
BY
user_id
,
merchant_id
,
regexp_replace
(
SUBSTR
(
a
.
partition_date
,
1
,
6
),
'-'
,
''
)
...
...
@@ -146,7 +147,7 @@ SELECT
(
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'
),
'-'
,
''
)
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
8
),
'MM'
),
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
)
t2
on
t1
.
user_id
=
t2
.
user_id
and
t1
.
DATE_DAY
=
t2
.
partition_date
...
...
pm/wel_clue_by_channel/report/welfare_by_channel.sql
View file @
66a24e90
...
...
@@ -18,7 +18,7 @@ SELECT
,
first_channel_source_type
,
concat_ws
(
'-'
,
substr
(
partition_date
,
1
,
4
),
substr
(
partition_date
,
5
,
2
),
substr
(
partition_date
,
7
,
2
))
AS
first_active_date
FROM
online
.
ml_device_day_active_status
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
8
),
'MM'
),
'-'
,
''
)
AND
partition_date
<=
regexp_replace
(
date_sub
(
current_date
(),
1
),
'-'
,
''
)
AND
active_type
in
(
'1'
,
'2'
)
AND
first_channel_source_type
not
in
(
'yqxiu1'
,
'yqxiu2'
,
'yqxiu3'
,
'yqxiu4'
,
'yqxiu5'
,
'mxyc1'
,
'mxyc2'
,
'mxyc3'
...
...
@@ -51,7 +51,7 @@ 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
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
1
),
'MM'
),
'-'
,
''
)
WHERE
partition_date
>=
REGEXP_REPLACE
(
trunc
(
date_sub
(
current_date
(),
8
),
'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'
...
...
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