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
70f661eb
Commit
70f661eb
authored
Aug 03, 2022
by
胡涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标统计sql脚本
parent
f56b3e5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
ZB_DM/承保指标/ZB_DM_今日签单今年待起保保费.sql
ZB_DM/承保指标/ZB_DM_今日签单今年待起保保费.sql
+4
-4
ZB_DM/承保指标/ZB_DM_归属业务人员当日签单保费排名.sql
ZB_DM/承保指标/ZB_DM_归属业务人员当日签单保费排名.sql
+11
-11
No files found.
ZB_DM/承保指标/ZB_DM_今日签单今年待起保保费.sql
View file @
70f661eb
...
@@ -42,7 +42,7 @@ group by
...
@@ -42,7 +42,7 @@ group by
;
;
-- 分公司
-- 分公司
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
AM
L
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
MA
L
select
select
CONCAT
(
CONCAT
(
'provqbbf/'
'provqbbf/'
...
@@ -57,7 +57,7 @@ group by
...
@@ -57,7 +57,7 @@ group by
;
;
-- 中支
-- 中支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
AM
L
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
MA
L
select
select
CONCAT
(
CONCAT
(
'cityqbbf/'
'cityqbbf/'
...
@@ -73,7 +73,7 @@ group by
...
@@ -73,7 +73,7 @@ group by
-- 县支
-- 县支
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
AM
L
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
MA
L
select
select
CONCAT
(
CONCAT
(
'countryqbbf/'
'countryqbbf/'
...
@@ -89,7 +89,7 @@ group by
...
@@ -89,7 +89,7 @@ group by
-- 团队
-- 团队
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
AM
L
insert
into
ZB_DM
.
ZB_DM_REDIS
.
HSET_DECI
MA
L
select
select
CONCAT
(
CONCAT
(
'teamqbbf/'
'teamqbbf/'
...
...
ZB_DM/承保指标/ZB_DM_归属业务人员当日签单保费排名.sql
View file @
70f661eb
...
@@ -30,16 +30,16 @@ from (
...
@@ -30,16 +30,16 @@ from (
,
d1
.
`LEVEL1COMDESC`
as
`comname`
,
d1
.
`LEVEL1COMDESC`
as
`comname`
,
d1
.
`id`
as
`id`
,
d1
.
`id`
as
`id`
,
d1
.
`name`
as
`name`
,
d1
.
`name`
as
`name`
,
d1
.
`cost`
as
`cost`
,
cast
(
d1
.
`cost`
AS
VARCHAR
)
as
`cost`
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
d1
.
`uwConclueDate`
ORDER
BY
d1
.
`cost`
DESC
)
as
rownum
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
d1
.
`uwConclueDate`
ORDER
BY
d1
.
`cost`
DESC
)
as
rownum
from
(
from
(
select
select
`uwConclueDate`
as
`uwConclueDate`
`uwConclueDate`
as
`uwConclueDate`
,
`LEVEL1COMCODE`
as
`LEVEL1COMCODE`
,
`LEVEL1COMCODE`
as
`LEVEL1COMCODE`
,
`LEVEL1COMDESC`
as
`LEVEL1COMDESC`
,
`LEVEL1COMDESC`
as
`LEVEL1COMDESC`
,
`id`
as
`id`
,
`id`
as
`id`
,
`name`
as
`name`
,
`name`
as
`name`
,
sum
(
`cost`
)
as
`cost`
,
sum
(
cast
(
`cost`
as
DECIMAL
(
18
,
2
)))
as
`cost`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
where
where
`COMNAME`
is
not
null
`COMNAME`
is
not
null
...
@@ -95,7 +95,7 @@ from (
...
@@ -95,7 +95,7 @@ from (
,
d1
.
`LEVEL2COMDESC`
as
`cityname`
,
d1
.
`LEVEL2COMDESC`
as
`cityname`
,
d1
.
`id`
as
`id`
,
d1
.
`id`
as
`id`
,
d1
.
`name`
as
`name`
,
d1
.
`name`
as
`name`
,
d1
.
`cost`
as
`cost`
,
cast
(
d1
.
`cost`
AS
VARCHAR
)
as
`cost`
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
d1
.
`uwConclueDate`
,
d1
.
`LEVEL1COMCODE`
ORDER
BY
d1
.
`cost`
DESC
)
as
rownum
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
d1
.
`uwConclueDate`
,
d1
.
`LEVEL1COMCODE`
ORDER
BY
d1
.
`cost`
DESC
)
as
rownum
from
(
from
(
select
select
...
@@ -106,7 +106,7 @@ from (
...
@@ -106,7 +106,7 @@ from (
,
`LEVEL2COMDESC`
as
`LEVEL2COMDESC`
,
`LEVEL2COMDESC`
as
`LEVEL2COMDESC`
,
`id`
as
`id`
,
`id`
as
`id`
,
`name`
as
`name`
,
`name`
as
`name`
,
sum
(
`cost`
)
as
`cost`
,
sum
(
cast
(
`cost`
as
DECIMAL
(
18
,
2
)))
as
`cost`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
where
where
`COMNAME`
is
not
null
`COMNAME`
is
not
null
...
@@ -168,7 +168,7 @@ from (
...
@@ -168,7 +168,7 @@ from (
,
d1
.
`LEVEL3COMDESC`
as
`countryname`
,
d1
.
`LEVEL3COMDESC`
as
`countryname`
,
d1
.
`id`
as
`id`
,
d1
.
`id`
as
`id`
,
d1
.
`name`
as
`name`
,
d1
.
`name`
as
`name`
,
d1
.
`cost`
as
`cost`
,
cast
(
d1
.
`cost`
AS
VARCHAR
)
as
`cost`
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
d1
.
`uwConclueDate`
,
d1
.
`LEVEL2COMCODE`
ORDER
BY
d1
.
`cost`
DESC
)
as
rownum
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
d1
.
`uwConclueDate`
,
d1
.
`LEVEL2COMCODE`
ORDER
BY
d1
.
`cost`
DESC
)
as
rownum
from
(
from
(
select
select
...
@@ -181,7 +181,7 @@ from (
...
@@ -181,7 +181,7 @@ from (
,
`LEVEL3COMDESC`
as
`LEVEL3COMDESC`
,
`LEVEL3COMDESC`
as
`LEVEL3COMDESC`
,
`id`
as
`id`
,
`id`
as
`id`
,
`name`
as
`name`
,
`name`
as
`name`
,
sum
(
`cost`
)
as
`cost`
,
sum
(
cast
(
`cost`
as
DECIMAL
(
18
,
2
)))
as
`cost`
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
where
where
`COMNAME`
is
not
null
`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