Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
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
宋柯
meta_base_code
Commits
a49e6fd2
Commit
a49e6fd2
authored
Nov 26, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
411e99d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
new_user_project_analysis.py
new_user_analysis/new_user_project_analysis.py
+3
-3
No files found.
new_user_analysis/new_user_project_analysis.py
View file @
a49e6fd2
...
@@ -113,8 +113,8 @@ for t in range(1, task_days):
...
@@ -113,8 +113,8 @@ for t in range(1, task_days):
yesterday_str_format
=
(
now
+
datetime
.
timedelta
(
days
=-
1
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
yesterday_str_format
=
(
now
+
datetime
.
timedelta
(
days
=-
1
))
.
strftime
(
"
%
Y-
%
m-
%
d"
)
one_week_age_str
=
(
now
+
datetime
.
timedelta
(
days
=-
7
))
.
strftime
(
"
%
Y
%
m
%
d"
)
one_week_age_str
=
(
now
+
datetime
.
timedelta
(
days
=-
7
))
.
strftime
(
"
%
Y
%
m
%
d"
)
new_urser_device_id_sql
=
r"""
new_urser_device_id_sql
=
r"""
select t
2
.device_id as device_id from
select t
3
.device_id as device_id from
(select device_id from online.ml_device_day_active_status where partition_date = '{today_str}' and active_type in (1,2)) t2
(
(
select device_id from online.ml_device_day_active_status where partition_date = '{today_str}' and active_type in (1,2)) t2
LEFT JOIN
LEFT JOIN
(
(
select distinct device_id
select distinct device_id
...
@@ -123,7 +123,7 @@ for t in range(1, task_days):
...
@@ -123,7 +123,7 @@ for t in range(1, task_days):
AND is_abnormal_device = 'true'
AND is_abnormal_device = 'true'
)dev
)dev
on t2.device_id=dev.device_id
on t2.device_id=dev.device_id
WHERE dev.device_id is null and
first_device is not null
WHERE dev.device_id is null and
t2.device_id is not null) t3
"""
.
format
(
today_str
=
today_str
,
yesterday_str_format
=
yesterday_str_format
,
today_str_format
=
today_str_format
,
"""
.
format
(
today_str
=
today_str
,
yesterday_str_format
=
yesterday_str_format
,
today_str_format
=
today_str_format
,
tomorrow_str
=
tomorrow_str
)
tomorrow_str
=
tomorrow_str
)
...
...
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