Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dataquality_doc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王东
dataquality_doc
Commits
578b9177
Commit
578b9177
authored
Aug 25, 2022
by
胡涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标统计sql脚本
parent
05c5d5e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
ZB_DM/承保指标/new团队汇总结果/ZB_DM_团队汇总结果_ALL.sql
ZB_DM/承保指标/new团队汇总结果/ZB_DM_团队汇总结果_ALL.sql
+7
-7
No files found.
ZB_DM/承保指标/new团队汇总结果/ZB_DM_团队汇总结果_ALL.sql
View file @
578b9177
...
@@ -12,7 +12,7 @@ select
...
@@ -12,7 +12,7 @@ select
,
a1
.
`LEVEL3COMCODE`
as
`LEVEL3COMCODE`
,
a1
.
`LEVEL3COMCODE`
as
`LEVEL3COMCODE`
,
a1
.
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
a1
.
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
a1
.
`startTime`
as
`startTime`
,
a1
.
`startTime`
as
`startTime`
,
a1
.
`cost`
+
if
(
t1
.
cost
is
null
,
0
,
cast
(
t1
.
cost
as
decimal
(
18
,
2
))
)
as
`cost`
,
cast
(
a1
.
`cost`
+
if
(
t1
.
cost
is
null
,
0
,
cast
(
t1
.
cost
as
decimal
(
18
,
2
)))
as
varchar
)
as
`cost`
,
a1
.
`log_time`
as
`log_time`
,
a1
.
`log_time`
as
`log_time`
from
(
from
(
...
@@ -23,10 +23,10 @@ from (
...
@@ -23,10 +23,10 @@ from (
,
s1
.
`LEVEL3COMCODE`
as
`LEVEL3COMCODE`
,
s1
.
`LEVEL3COMCODE`
as
`LEVEL3COMCODE`
,
s1
.
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
s1
.
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
s1
.
`startTime`
as
`startTime`
,
s1
.
`startTime`
as
`startTime`
,
cast
(
sum
(
cast
(
s1
.
`cost`
as
DECIMAL
(
18
,
2
)))
as
varchar
)
as
`cost`
,
sum
(
cast
(
s1
.
`cost`
as
DECIMAL
(
18
,
2
)))
as
`cost`
,
cast
(
DateTimeToLongUDF
(
tumble_end
(
s1
.
row_time
,
interval
'1'
hour
)
)
as
varchar
)
as
`log_time`
,
cast
(
DateTimeToLongUDF
(
tumble_end
(
s1
.
row_time
,
interval
'1'
hour
)
)
as
varchar
)
as
`log_time`
,
max
(
s1
.
proctime
)
as
proctime
,
max
(
s1
.
proctime
)
as
proctime
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
where
`COMNAME`
is
not
null
`COMNAME`
is
not
null
and
LEFT
(
`uwConclueDate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
LEFT
(
`uwConclueDate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
...
@@ -39,10 +39,10 @@ from (
...
@@ -39,10 +39,10 @@ from (
,
s1
.
`startTime`
,
s1
.
`startTime`
,
tumble
(
s1
.
row_time
,
interval
'1'
hour
)
,
tumble
(
s1
.
row_time
,
interval
'1'
hour
)
)
a1
)
a1
left
join
ZB_DM
.
ZB_DM_MYSQL
.
TEAM_ALL
for
system_time
as
of
s
1
.
proctime
as
t1
left
join
ZB_DM
.
ZB_DM_MYSQL
.
TEAM_ALL
for
system_time
as
of
a
1
.
proctime
as
t1
on
s
1
.
`uwConclueDate`
=
t1
.
`uwConclueDate`
on
a
1
.
`uwConclueDate`
=
t1
.
`uwConclueDate`
and
s
1
.
`LEVEL4COMCODE`
=
t1
.
`LEVEL4COMCODE`
and
a
1
.
`LEVEL4COMCODE`
=
t1
.
`LEVEL4COMCODE`
and
s
1
.
`startTime`
=
t1
.
`startTime`
and
a
1
.
`startTime`
=
t1
.
`startTime`
;
;
...
...
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