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
69a29e52
Commit
69a29e52
authored
Mar 07, 2017
by
mengdongxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tkdm_base_active_payment_info.sql
parent
e408b967
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
tkdm_base_active_payment_info.sql
tkdm_base_active_payment_info.sql
+7
-6
No files found.
tkdm_base_active_payment_info.sql
View file @
69a29e52
...
...
@@ -15,8 +15,8 @@ select /*+mapjoin(y)*/x.deviceid,
x
.
category_id
,
x
.
isgame
,
x
.
platform
,
nvl
(
x
.
first_payment_ds
,
y
.
first_
payment_ds
)
as
first_payment_ds
,
nvl
(
y
.
last_
payment_ds
,
x
.
last_amt_payment
)
as
last_payment_ds
,
nvl
(
x
.
first_payment_ds
,
y
.
payment_ds
)
as
first_payment_ds
,
nvl
(
y
.
payment_ds
,
x
.
last_amt_payment
)
as
last_payment_ds
,
x
.
num_payment_cnt
+
y
.
num_payment_cnt
as
num_payment_cnt
,
x
.
num_payment_day
+
y
.
num_payment_day
as
num_payment_day
,
x
.
amt_payment
+
y
.
amt_payment
as
amt_payment
,
...
...
@@ -53,7 +53,7 @@ from
amt_payment
,
last_amt_payment
from
tkdm
.
tkdm_base_active_payment_info
where
ds
=
date_sub
(
'2017-02-25'
,
1
)
where
ds
=
date_sub
(
'2017-02-25'
,
1
)
)
a
full
join
...
...
@@ -66,7 +66,7 @@ from
isgame
,
platform
from
tkdm
.
tkdm_data_active_detial_day
where
ds
=
'2017-02-25'
where
ds
=
'2017-02-25'
)
b
on
a
.
deviceid
=
b
.
deviceid
and
a
.
appid
=
b
.
appid
)
x
...
...
@@ -75,12 +75,12 @@ left join
(
select
deviceid
,
appid
,
to_date
(
ins_datetime
)
as
ins_date
,
'2017-02-25'
as
first_payment_ds
,
'2017-02-25'
as
last_payment_ds
,
'2017-02-25'
as
payment_ds
,
num_payment_cnt
,
1
as
num_payment_day
,
amt_payment
from
tkdm
.
tkdm_data_payment_detial_day
where
ds
=
'2017-02-25'
)
y
on
x
.
deviceid
=
y
.
deviceid
and
x
.
appid
=
y
.
appid
cluster
by
deviceid
,
appid
...
...
@@ -109,3 +109,4 @@ FIELDS TERMINATED BY '\t'
STORED
AS
ORC
location
's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_base_active_payment_info'
;
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