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
c9dbb37b
Commit
c9dbb37b
authored
Aug 25, 2022
by
胡涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标统计sql脚本
parent
65f446ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
ZB_DM/承保指标/new今日签单/ZB_DM_今日签单合并_NEW.sql
ZB_DM/承保指标/new今日签单/ZB_DM_今日签单合并_NEW.sql
+16
-16
No files found.
ZB_DM/承保指标/new今日签单/ZB_DM_今日签单合并_NEW.sql
View file @
c9dbb37b
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
-- 团队汇总
-- 团队汇总
CREATE
TEMPORARY
VIEW
VIEW_ZB_DM_JRQDBF_HB_TUANDUI
AS
CREATE
TEMPORARY
VIEW
VIEW_ZB_DM_JRQDBF_HB_TUANDUI
AS
select
select
a1
.
`uwConclueDate`
a1
.
`uwConclueDate`
as
`uwConclueDate`
,
a1
.
`LEVEL1COMCODE`
,
a1
.
`LEVEL1COMCODE`
as
`LEVEL1COMCODE`
,
a1
.
`LEVEL2COMCODE`
,
a1
.
`LEVEL2COMCODE`
as
`LEVEL2COMCODE`
,
a1
.
`LEVEL3COMCODE`
,
a1
.
`LEVEL3COMCODE`
as
`LEVEL3COMCODE`
,
a1
.
`LEVEL4COMCODE`
,
a1
.
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
a1
.
`startTime`
,
a1
.
`startTime`
as
`startTime`
,
a1
.
`risk`
,
a1
.
`risk`
as
`risk`
,
a1
.
`cost`
+
if
(
t1
.
cost
is
null
,
0
,
cast
(
t1
.
cost
as
decimal
(
18
,
2
)))
,
a1
.
`cost`
+
if
(
t1
.
cost
is
null
,
0
,
cast
(
t1
.
cost
as
decimal
(
18
,
2
)))
as
`cost`
from
(
from
(
SELECT
SELECT
s1
.
`uwConclueDate`
as
`uwConclueDate`
s1
.
`uwConclueDate`
as
`uwConclueDate`
...
@@ -37,14 +37,14 @@ from (
...
@@ -37,14 +37,14 @@ from (
,
s1
.
`startTime`
,
s1
.
`startTime`
,
s1
.
`risk`
,
s1
.
`risk`
)
a1
)
a1
left
join
ZB_DM
.
ZB_DM_MYSQL
.
TEAM_RISK
for
system_time
as
of
s
1
.
proctime
as
t1
left
join
ZB_DM
.
ZB_DM_MYSQL
.
TEAM_RISK
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
.
`LEVEL1COMCODE`
=
t1
.
`LEVEL1COMCODE`
and
a
1
.
`LEVEL1COMCODE`
=
t1
.
`LEVEL1COMCODE`
and
s
1
.
`LEVEL2COMCODE`
=
t1
.
`LEVEL2COMCODE`
and
a
1
.
`LEVEL2COMCODE`
=
t1
.
`LEVEL2COMCODE`
and
s
1
.
`LEVEL3COMCODE`
=
t1
.
`LEVEL3COMCODE`
and
a
1
.
`LEVEL3COMCODE`
=
t1
.
`LEVEL3COMCODE`
and
s
1
.
`LEVEL4COMCODE`
=
t1
.
`LEVEL4COMCODE`
and
a
1
.
`LEVEL4COMCODE`
=
t1
.
`LEVEL4COMCODE`
and
s
1
.
`startTime`
=
t1
.
`startTime`
and
a
1
.
`startTime`
=
t1
.
`startTime`
and
s
1
.
`risk`
=
t1
.
`risk`
and
a
1
.
`risk`
=
t1
.
`risk`
and
LongTimeToStringUDF
(
t1
.
log_time
,
'yyyyMMdd HH'
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd HH'
)
and
LongTimeToStringUDF
(
t1
.
log_time
,
'yyyyMMdd HH'
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd HH'
)
;
;
...
...
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