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
23720e9d
Commit
23720e9d
authored
Aug 25, 2022
by
王东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标计算承保字段调整
parent
dc7cdc6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
9 deletions
+31
-9
ZB_DM/承保指标/new今日签单/ZB_DM_今日签单(合并).sql
ZB_DM/承保指标/new今日签单/ZB_DM_今日签单(合并).sql
+31
-9
No files found.
ZB_DM/承保指标/new今日签单/ZB_DM_今日签单(合并).sql
View file @
23720e9d
...
...
@@ -11,16 +11,38 @@ SELECT
,
s1
.
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
s1
.
`startTime`
as
`startTime`
,
s1
.
`risk`
as
`risk`
,
sum
(
cast
(
s1
.
`cost`
as
DECIMAL
(
18
,
2
)))
as
`cost`
,
sum
(
cast
(
s1
.
`cost`
as
DECIMAL
(
18
,
2
)))
+
t1
.
`cost`
as
`cost`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
left
join
ZB_DM
.
ZB_DM_MYSQL
.
TEAM
for
system_time
as
of
s1
.
proctime
as
t1
on
s1
.
`uwConclueDate`
=
s1
.
`uwConclueDate`
and
s1
.
`LEVEL1COMCODE`
=
s1
.
`LEVEL1COMCODE`
and
s1
.
`LEVEL2COMCODE`
=
s1
.
`LEVEL2COMCODE`
and
s1
.
`LEVEL3COMCODE`
=
s1
.
`LEVEL3COMCODE`
and
s1
.
`LEVEL4COMCODE`
=
s1
.
`LEVEL4COMCODE`
and
s1
.
`startTime`
=
s1
.
`startTime`
and
s1
.
`risk`
=
s1
.
`risk`
left
join
(
select
`uwConclueDate`
as
`uwConclueDate`
,
`LEVEL1COMCODE`
as
`LEVEL1COMCODE`
,
`LEVEL2COMCODE`
as
`LEVEL2COMCODE`
,
`LEVEL3COMCODE`
as
`LEVEL3COMCODE`
,
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
`startTime`
as
`startTime`
,
`risk`
as
`risk`
,
left
(
t1
.
log_time
,
8
)
as
log_time
,
sum
(
cast
(
cost
as
decimal
(
18
,
2
)))
as
`cost`
from
ZB_DM
.
ZB_DM_MYSQL
.
TEAM
where
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
group
by
`uwConclueDate`
,
`LEVEL1COMCODE`
,
`LEVEL2COMCODE`
,
`LEVEL3COMCODE`
,
`LEVEL4COMCODE`
,
`startTime`
,
`risk`
,
left
(
t1
.
log_time
,
8
)
)
for
system_time
as
of
s1
.
proctime
as
t1
on
s1
.
`uwConclueDate`
=
t1
.
`uwConclueDate`
and
s1
.
`LEVEL1COMCODE`
=
t1
.
`LEVEL1COMCODE`
and
s1
.
`LEVEL2COMCODE`
=
t1
.
`LEVEL2COMCODE`
and
s1
.
`LEVEL3COMCODE`
=
t1
.
`LEVEL3COMCODE`
and
s1
.
`LEVEL4COMCODE`
=
t1
.
`LEVEL4COMCODE`
and
s1
.
`startTime`
=
t1
.
`startTime`
and
s1
.
`risk`
=
t1
.
`risk`
and
left
(
t1
.
log_time
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
where
s1
.
`COMNAME`
is
not
null
...
...
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