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
e0522570
Commit
e0522570
authored
Aug 25, 2022
by
王东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标计算承保字段调整
parent
18808f47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
2 deletions
+46
-2
ZB_DM/承保指标/new团队汇总结果/ZB_DM_今日签单(合并).sql
ZB_DM/承保指标/new团队汇总结果/ZB_DM_今日签单(合并).sql
+44
-0
ZB_ODS/DDL元数据/WJPK.sql
ZB_ODS/DDL元数据/WJPK.sql
+2
-2
No files found.
ZB_DM/承保指标/new团队汇总结果/ZB_DM_今日签单(合并).sql
0 → 100644
View file @
e0522570
-- ZB_DM_JRQDBF_HB ZB_DM_今日签单合并
-- step1:
-- 团队汇总
CREATE
TEMPORARY
VIEW
ZB_DM
.
ZB_DM_MYSQL
.
TDHZ
AS
SELECT
s1
.
`uwConclueDate`
as
`uwConclueDate`
,
s1
.
`LEVEL1COMCODE`
as
`LEVEL1COMCODE`
,
s1
.
`LEVEL2COMCODE`
as
`LEVEL2COMCODE`
,
s1
.
`LEVEL3COMCODE`
as
`LEVEL3COMCODE`
,
s1
.
`LEVEL4COMCODE`
as
`LEVEL4COMCODE`
,
s1
.
`startTime`
as
`startTime`
,
s1
.
`risk`
as
`risk`
,
s1
.
`chnl`
as
`chnl`
,
s1
.
`businessNatureCode`
as
`businessNatureCode`
,
sum
(
cast
(
s1
.
`cost`
as
DECIMAL
(
18
,
2
)))
as
`cost`
,
DATE_FORMAT
(
tumble_end
(
s1
.
row_time
,
interval
'1'
minute
)
,
'yyyy-MM-dd HH:mm:ss'
)
as
`log_time`
from
(
select
*
,
ROW_NUMBER
()
OVER
(
PARTITION
BY
`no`
,
`COMCODE`
,
`cost`
ORDER
BY
`uwConclueDate`
DESC
)
as
rownum
from
ZB_ODS
.
ZB_ODS_KAFKA
.
CBDATA
where
`COMNAME`
is
not
null
and
`uwConclueDate`
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
)
s1
where
s1
.
rownum
=
1
group
by
s1
.
`uwConclueDate`
,
s1
.
`LEVEL1COMCODE`
,
s1
.
`LEVEL2COMCODE`
,
s1
.
`LEVEL3COMCODE`
,
s1
.
`LEVEL4COMCODE`
,
s1
.
`startTime`
,
s1
.
`risk`
,
s1
.
`chnl`
,
s1
.
`businessNatureCode`
,
tumble
(
s1
.
row_time
,
interval
'1'
hour
)
;
ZB_ODS/DDL元数据/WJPK.sql
View file @
e0522570
...
@@ -6,8 +6,8 @@ create table WJPK(
...
@@ -6,8 +6,8 @@ create table WJPK(
businessNatureCode
String
,
-- 业务来源
businessNatureCode
String
,
-- 业务来源
businessChannelCode
String
,
-- 渠道
businessChannelCode
String
,
-- 渠道
cladate
String
,
-- 立案日期
cladate
String
,
-- 立案日期
setdate
String
,
--
结案
日期
setdate
String
,
--
估损调整
日期
settledamount
String
,
--
已决赔款金额
settledamount
String
,
--
估损提转差
lossamout
String
,
-- 估损金额
lossamout
String
,
-- 估损金额
flag
String
,
-- 类型
flag
String
,
-- 类型
claimno
String
,
-- 赔案号
claimno
String
,
-- 赔案号
...
...
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