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
ad7c821f
Commit
ad7c821f
authored
Mar 10, 2017
by
mengdongxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tkdm_output_app_cumsum_all.sql
parent
a97ffa47
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
tkdm_output_app_cumsum_all.sql
tkdm_output_app_cumsum_all.sql
+8
-0
No files found.
tkdm_output_app_cumsum_all.sql
View file @
ad7c821f
...
...
@@ -2,6 +2,8 @@ insert overwrite table tkdm.tkdm_output_app_cumsum_all partition(ds='$ds')
select
'$ds'
as
dt
,
appid
,
sum
(
cum_num_click
)
as
cum_num_click
,
sum
(
cum_dupnum_click_day
)
as
cum_dupnum_click_day
,
sum
(
cum_dupnum_click_all
)
as
cum_dupnum_click_all
,
sum
(
cum_num_install
)
as
cum_num_install
,
sum
(
cum_dupnum_reged_day
)
as
cum_dupnum_reged_day
,
...
...
@@ -13,6 +15,8 @@ select '$ds' as dt,
from
(
select
appid
,
cum_num_click
,
cum_dupnum_click_day
,
cum_dupnum_click_all
,
cum_num_install
,
cum_dupnum_reged_day
,
...
...
@@ -28,6 +32,8 @@ select appid,
union
all
select
appid
,
sum
(
num_click
)
as
cum_num_click
,
sum
(
dupnum_click_day
)
as
cum_dupnum_click_day
,
sum
(
dupnum_click_all
)
as
cum_dupnum_click_all
,
sum
(
num_install
)
as
cum_num_install
,
sum
(
dupnum_reged_day
)
as
cum_dupnum_reged_day
,
...
...
@@ -46,6 +52,8 @@ select appid,
create
EXTERNAL
table
tkdm_output_app_cumsum_all
(
dt
string
,
appid
string
,
cum_num_click
int
,
cum_dupnum_click_day
int
,
cum_dupnum_click_all
int
,
cum_num_install
int
,
cum_dupnum_reged_day
int
,
...
...
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