Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkdm
Project
Overview
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etl
tkdm
Commits
7070f85e
Commit
7070f85e
authored
8 years ago
by
mengdongxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tkdm_base_device_pay_info.sql
parent
e3b490e5
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tkdm_base_device_pay_info.sql
tkdm_base_device_pay_info.sql
+3
-3
No files found.
tkdm_base_device_pay_info.sql
View file @
7070f85e
...
...
@@ -15,11 +15,11 @@ select nvl(b.appid,a.appid) as appid,
nvl
(
b
.
num_payment_cnt
,
0
)
+
nvl
(
a
.
num_payment_cnt
,
0
)
as
num_payment_cnt
,
nvl
(
b
.
num_payment_day
,
0
)
+
nvl
(
a
.
num_payment_day
,
0
)
as
num_payment_day
,
round
(
nvl
(
b
.
amt_payment
,
0
)
+
nvl
(
a
.
amt_payment
,
0
),
2
)
as
amt_payment
,
nvl
(
a
.
is_new
,
0
)
as
is_new_for_last_ds
coalesce
(
a
.
ins_datetime
,
b
.
ins_datetime
,
'1970-01-01'
)
as
ins_datetime
from
(
select
appid
,
deviceid
,
i
s_new
,
i
ns_datetime
,
amt_payment
,
num_payment_cnt
,
1
as
num_payment_day
...
...
@@ -57,7 +57,7 @@ last_payment_ds string,
num_payment_cnt
int
,
num_payment_day
int
,
amt_payment
double
,
i
s_new_for_last_ds
int
i
ns_datetime
string
)
PARTITIONED
BY
(
ds
string
)
clustered
by
(
deviceid
)
sorted
by
(
deviceid
,
appid
)
into
32
buckets
...
...
This diff is collapsed.
Click to expand it.
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