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
d8e1a640
Commit
d8e1a640
authored
Oct 26, 2022
by
胡涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标计算(函数自增)sql脚本
parent
d9aa22fb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
175 deletions
+0
-175
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_归属人员和大单.sql
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_归属人员和大单.sql
+0
-175
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保合并.sql
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保合并.sql
+0
-0
ZB_DM/理赔指标/方案四(函数自增)/ZB_DM_理赔合并.sql
ZB_DM/理赔指标/方案四(函数自增)/ZB_DM_理赔合并.sql
+0
-0
No files found.
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_归属人员和大单.sql
View file @
d8e1a640
...
@@ -117,95 +117,10 @@ from (
...
@@ -117,95 +117,10 @@ from (
)
s1
)
s1
;
;
-- ZB_DM_CAR_HB ZB_DM_承保车险合并
-- ZB_DM_QDBF_CAR/ZB_DM_车险今日签单保费
-- key:allcarqbbf/日期
-- 1、日期:核保日期或者核批完成日期(yyyyMMdd)
-- 2、车险
-- 总公司
insert
into
ZB_DM
.
ZB_DM_REDIS
.
SET_DECIMAL
select
CONCAT
(
'allcarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
cast
(
sumZBUDF
(
CONCAT
(
'allcarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
=
'05'
;
-- 分公司
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'provcarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL1COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'provcarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
=
'05'
;
-- 中支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'citycarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL2COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'citycarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
=
'05'
;
-- 县支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'countycarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL3COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'countycarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
=
'05'
;
-- 团队
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'teamcarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL4COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'countycarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
=
'05'
;
-- ZB_DM_CXCBDD ZB_DM_车险承保大单
-- ZB_DM_CXCBDD ZB_DM_车险承保大单
...
@@ -344,96 +259,6 @@ from (
...
@@ -344,96 +259,6 @@ from (
;
;
-- ZB_DM_NOCAR_HB ZB_DM_承保非车险合并
-- ZB_DM_QDBF_NOCAR/ZB_DM_非车险今日签单保费
-- key:allnocarqbbf/日期
-- 1、日期:核保日期或者核批完成日期(yyyyMMdd)
-- 2、非车险
-- 总公司
insert
into
ZB_DM
.
ZB_DM_REDIS
.
SET_DECIMAL
select
CONCAT
(
'allnocarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
cast
(
sumZBUDF
(
CONCAT
(
'allnocarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
<>
'05'
;
-- 分公司
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'provnocarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL1COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'provnocarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
<>
'05'
;
-- 中支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'citynocarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL2COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'citynocarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
<>
'05'
;
-- 县支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'countynocarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL3COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'countynocarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
<>
'05'
;
-- 团队
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECIMAL
select
CONCAT
(
'teamnocarqdbf/'
,
s1
.
`uwConclueDate`
)
as
`key`
,
s1
.
`LEVEL4COMCODE`
as
`hkey`
,
cast
(
sumZBUDF
(
CONCAT
(
'countynocarqdbf/'
,
s1
.
`uwConclueDate`
)
,
s1
.
`cost`
,
s1
.
`uwConclueDate`
)
as
decimal
(
18
,
2
))
as
`val`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
s1
.
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
left
(
s1
.
risk
,
2
)
<>
'05'
;
-- ZB_DM_FCXCBDD ZB_DM_非车险承保大单
-- ZB_DM_FCXCBDD ZB_DM_非车险承保大单
-- bigfcbd/日期
-- bigfcbd/日期
...
...
ZB_DM/承保指标/方案四(函数自增)/ZB_DM_承保合并.sql
View file @
d8e1a640
This diff is collapsed.
Click to expand it.
ZB_DM/理赔指标/方案四(函数自增)/ZB_DM_理赔合并.sql
View file @
d8e1a640
This diff is collapsed.
Click to expand it.
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