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
edf6bbcb
Commit
edf6bbcb
authored
Sep 27, 2022
by
胡涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指标统计sql脚本
parent
46fac2a1
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
75 deletions
+86
-75
XF_DWD/XF_DWD_ENDOR.sql
XF_DWD/XF_DWD_ENDOR.sql
+6
-2
XF_DWD/XF_DWD_POLICY.sql
XF_DWD/XF_DWD_POLICY.sql
+4
-1
XF_DWD/XF_DWD_REGIST.sql
XF_DWD/XF_DWD_REGIST.sql
+3
-2
XF_DWD/新核心车险保单-FM.ftl
XF_DWD/新核心车险保单-FM.ftl
+43
-40
XF_DWD/新核心车险批单-FM.ftl
XF_DWD/新核心车险批单-FM.ftl
+0
-0
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_分渠道未决赔款.sql
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_分渠道未决赔款.sql
+5
-5
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_分险类未决赔款.sql
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_分险类未决赔款.sql
+5
-5
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_未决赔款(合并).sql
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_未决赔款(合并).sql
+15
-15
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_未决赔款.sql
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_未决赔款.sql
+5
-5
No files found.
XF_DWD/XF_DWD_ENDOR.sql
View file @
edf6bbcb
...
...
@@ -39,8 +39,12 @@ select
s1
.
coinsLinkCode
,
-- 指标新增_联保标志代码 0 非联保 3,主联,4从联
s1
.
actualId
,
-- 指标新增_唯一标识需验证
s1
.
businessNo
,
-- 业务单号
t1
.
LEVEL1COMCODE
-- 分公司代码
t1
.
LEVEL1COMCODE
,
-- 分公司代码
cast
(
case
when
coinsLinkCode
=
'0'
then
1
else
cast
(
JsonGetCoinsRateUDF
(
plcSolution
[
1
].
plcCoins
.
plcLinkBasicInformat
,
'coinsLinkCode'
,
coinsLinkCode
)
as
decimal
(
30
,
4
))
/
100
end
as
varchar
)
as
coinsrate
-- 系数
from
XF_ODS
.
XF_ODS_KAFKA
.
ENDOR
s1
left
join
XF_ODS
.
XF_ODS_MYSQL
.
CD_COM_ALL
for
system_time
as
of
s1
.
proctime
as
t1
on
s1
.
businessOffice
=
t1
.
COMCODE
where
left
(
s1
.
productCode
,
2
)
=
'05'
XF_DWD/XF_DWD_POLICY.sql
View file @
edf6bbcb
...
...
@@ -40,10 +40,13 @@ select
s1
.
coinsLinkCode
,
-- 指标新增_联保标志代码 0 非联保 3,主联,4从联
s1
.
amount
,
-- 指标新增_保额
s1
.
actualId
,
-- 指标新增_唯一标识需验证
cast
(
case
when
coinsLinkCode
=
'0'
then
1
else
cast
(
JsonGetCoinsRateUDF
(
plcSolution
[
1
].
plcCoins
.
plcLinkBasicInformat
,
'coinsLinkCode'
,
coinsLinkCode
)
as
decimal
(
30
,
4
))
/
100
end
as
varchar
)
as
coinsrate
,
-- 系数
t1
.
LEVEL1COMCODE
-- 分公司代码
from
XF_ODS
.
XF_ODS_KAFKA
.
POLICY
s1
left
join
XF_ODS
.
XF_ODS_MYSQL
.
CD_COM_ALL
for
system_time
as
of
s1
.
proctime
as
t1
on
s1
.
businessOffice
=
t1
.
COMCODE
where
left
(
s1
.
productCode
,
2
)
=
'05'
...
...
XF_DWD/XF_DWD_REGIST.sql
View file @
edf6bbcb
...
...
@@ -4,7 +4,8 @@ select
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyy-MM-dd HH:mm:ss'
)
as
log_time
,
-- 加工平台处理数据时间
t1
.
LEVEL1COMCODE
-- 分公司代码
from
XF_ODS
.
XF_ODS_KAFKA
.
POLICY
s1
left
join
XF_ODS
.
XF_ODS_MYSQL
.
CD_COM_ALL
for
system_time
as
of
s1
.
proctime
as
t1
on
s1
.
businessOffice
=
t1
.
COMCODE
from
XF_ODS
.
XF_ODS_KAFKA
.
REGIST
s1
left
join
XF_ODS
.
XF_ODS_MYSQL
.
CD_COM_ALL
for
system_time
as
of
s1
.
proctime
as
t1
on
s1
.
actualData
.
prpPlcMainEOS
[
1
].
businessOffice
=
t1
.
COMCODE
where
left
(
s1
.
productCode
,
2
)
=
'05'
XF_DWD/新核心车险保单-FM.ftl
View file @
edf6bbcb
{"systemName":"流计算平台","systemCode":"D030","sendTime":"${.now?string("yyyy-MM-dd HH:mm:ss")}","msgCode":"carpolicy","msgName":"新核心车险保单信息","data":[{"policyNo":"${policyNo!}" <#-- 保单号 -->,"businessNo":"${businessNo!}" <#-- 业务号 -->,"underWriteEndDate":"${policyCreatDate!}" <#-- 核保通过时间 -->,"comCode":"${businessOffice!}" <#-- 保单归属机构代码 -->,"comName":"${businessOfficeName!}" <#-- 保单归属机构名称 -->,"riskCode":"${productCode!}" <#-- 险种代码 -->,"businessNature":"${businessNatureCode!}" <#-- 业务来源 -->,"startDate":"${startTime!}" <#-- 起保时间 -->,"endDate":"${endTime!}" <#-- 终保时间 -->,"sumPremium":"${netPremium!}" <#-- 不含税保费 -->,"premium":"${premium!}" <#-- 含税保费 -->,"licenseNo":"<#if plcCar05??>${plcCar05.licensePlateNo!}</#if>" <#-- 车牌号 -->,"frameNo":"<#if plcCar05??>${plcCar05.frameNo!}</#if>" <#-- 车架号 -->,"modelCode":"<#if plcCar05??>${plcCar05.vehicleId!}</#if>" <#-- 车型 -->,"newVehicleFlag":"<#if plcCar05??>${plcCar05.newVehicleFlag!}</#if>" <#-- 新车标识 -->,"appliName":"<#if plcApplicant??><#list plcApplicant as s1>${s1.customerName!}<#if plcApplicant?size-1 gt s1?index >|</#if></#list></#if>" <#-- 投保人名称 -->,"insuredName":"<#if plcPublicInsurant??><#list plcPublicInsurant as s1>${s1.customerName!}<#if plcPublicInsurant?size-1 gt s1?index >|</#if></#list></#if>" <#-- 被保人名称 -->,"newPolicyFlag":"${newPolicyFlag!}" <#-- 新保标识 -->,"autoTransreNewFlag":"${autoTransrenewFlag!}" <#-- 自动续保标识 -->,"transferPolicyFlag":"${transferPolicyFlag!}" <#-- 转保标识 -->,"transreNewFlag":"${transrenewFlag!}" <#-- 续保标识 -->,"artifSelfPricesRat":"<#if plcSolution??><#list plcSolution as s1>${s1.PlcRation.artifSelfPricesRat!}<#if plcSolution?size-1 gt s1?index >|</#if></#list></#if>" <#-- 自主定价系数 -->,"artifReviewPrem":"<#if plcSolution??><#list plcSolution as s1>${s1.PlcRation.artifReviewPrem!}<#if plcSolution?size-1 gt s1?index >|</#if></#list></#if>" <#-- 总保费 -->,"agentFee":"<#if plcSolution??><#list plcSolution as s1><#if s1.plcCommissionDetail??><#list s1.plcCommissionDetail as item>${item.agentFee!}<#if s1.plcCommissionDetail?size-1 gt item?index >|</#if></#list></#if></#list></#if>" <#-- 手续费含税金额 -->,"agentNetFee":"<#if plcSolution??><#list plcSolution as s1><#if s1.plcCommissionDetail??><#list s1.plcCommissionDetail as item>${item.agentNetFee!}<#if s1.plcCommissionDetail?size-1 gt item?index >|</#if></#list></#if></#list></#if>" <#-- 手续费不含税金额 -->,"agentComCode":"${saleaman!}" <#-- 代理机构代码 -->,"agentComName":"${saleamanName!}" <#-- 代理机构名称 -->,"newChnlType":"${businessChannelCode!}" <#-- 清分后渠道 -->,"carKindCode":"<#if plcCar05??>${plcCar05.carKindCode!}</#if>" <#-- 车辆种类 -->,"useNatureCode":"<#if plcCar05??>${plcCar05.carUserNatureCode!}</#if>" <#-- 车辆使用性质 -->,"policySort":"${policySort!}" <#-- 保单种类 -->,"actualvalue":"<#if plcCar05??>${plcCar05.actualvalue!}</#if>" <#-- 实际价值 -->,"businessType":"${businessType!}" <#-- 业务类型-->}]}
{
"systemName":"流计算平台",
"systemCode":"D030",
"sendTime":"${.now?string("yyyy-MM-dd HH:mm:ss")}",
"msgCode":"carpolicy",
"msgName":"新核心车险保单信息",
"data":[{
"policyNo":"${policyNo!}" <#-- 保单号 -->
,"businessNo":"${businessNo!}" <#-- 业务号 -->
,"underWriteEndDate":"${policyCreatDate!}" <#-- 核保通过时间 -->
,"comCode":"${businessOffice!}" <#-- 保单归属机构代码 -->
,"comName":"${businessOfficeName!}" <#-- 保单归属机构名称 -->
,"riskCode":"${productCode!}" <#-- 险种代码 -->
,"businessNature":"${businessNatureCode!}" <#-- 业务来源 -->
,"startDate":"${startTime!}" <#-- 起保时间 -->
,"endDate":"${endTime!}" <#-- 终保时间 -->
,"sumPremium":"${netPremium!}" <#-- 不含税保费 -->
,"premium":"${premium!}" <#-- 含税保费 -->
,"licenseNo":"<#if plcCar05??>${plcCar05.licensePlateNo!}</#if>" <#-- 车牌号 -->
,"frameNo":"<#if plcCar05??>${plcCar05.frameNo!}</#if>" <#-- 车架号 -->
,"modelCode":"<#if plcCar05??>${plcCar05.vehicleId!}</#if>" <#-- 车型 -->
,"newVehicleFlag":"<#if plcCar05??>${plcCar05.newVehicleFlag!}</#if>" <#-- 新车标识 -->
,"appliName":"<#if plcApplicant??><#list plcApplicant as s1>${s1.customerName!}<#if plcApplicant?size-1 gt s1?index >|</#if></#list></#if>" <#-- 投保人名称 -->
,"insuredName":"<#if plcPublicInsurant??><#list plcPublicInsurant as s1>${s1.customerName!}<#if plcPublicInsurant?size-1 gt s1?index >|</#if></#list></#if>" <#-- 被保人名称 -->
,"newPolicyFlag":"${newPolicyFlag!}" <#-- 新保标识 -->
,"autoTransreNewFlag":"${autoTransrenewFlag!}" <#-- 自动续保标识 -->
,"transferPolicyFlag":"${transferPolicyFlag!}" <#-- 转保标识 -->
,"transreNewFlag":"${transrenewFlag!}" <#-- 续保标识 -->
,"artifSelfPricesRat":"<#if plcSolution??><#list plcSolution as s1>${s1.PlcRation.artifSelfPricesRat!}<#if plcSolution?size-1 gt s1?index >|</#if></#list></#if>" <#-- 自主定价系数 -->
,"artifReviewPrem":"<#if plcSolution??><#list plcSolution as s1>${s1.PlcRation.artifReviewPrem!}<#if plcSolution?size-1 gt s1?index >|</#if></#list></#if>" <#-- 总保费 -->
,"agentFee":"<#if plcSolution??><#list plcSolution as s1><#if s1.plcCommissionDetail??><#list s1.plcCommissionDetail as item>${item.agentFee!}<#if s1.plcCommissionDetail?size-1 gt item?index >|</#if></#list></#if></#list></#if>" <#-- 手续费含税金额 -->
,"agentNetFee":"<#if plcSolution??><#list plcSolution as s1><#if s1.plcCommissionDetail??><#list s1.plcCommissionDetail as item>${item.agentNetFee!}<#if s1.plcCommissionDetail?size-1 gt item?index >|</#if></#list></#if></#list></#if>" <#-- 手续费不含税金额 -->
,"agentComCode":"${saleaman!}" <#-- 代理机构代码 -->
,"agentComName":"${saleamanName!}" <#-- 代理机构名称 -->
,"newChnlType":"${businessChannelCode!}" <#-- 清分后渠道 -->
,"carKindCode":"<#if plcCar05??>${plcCar05.carKindCode!}</#if>" <#-- 车辆种类 -->
,"useNatureCode":"<#if plcCar05??>${plcCar05.carUserNatureCode!}</#if>" <#-- 车辆使用性质 -->
,"policySort":"${policySort!}" <#-- 保单种类 -->
,"actualvalue":"<#if plcCar05??>${plcCar05.actualvalue!}</#if>" <#-- 实际价值 -->
,"businessType":"${businessType!}" <#-- 业务类型-->
}]
"systemName":"流计算平台",
"systemCode":"D030",
"sendTime":"${.now?string("yyyy-MM-dd HH:mm:ss")}",
"msgCode":"carpolicy",
"msgName":"新核心车险保单信息",
"data":[{
"policyNo":"${policyNo!}" <#-- 保单号 -->
,"businessNo":"${businessNo!}" <#-- 业务号 -->
,"underWriteEndDate":"${policyCreatDate!}" <#-- 核保通过时间 -->
,"comCode":"${businessOffice!}" <#-- 保单归属机构代码 -->
,"comName":"${businessOfficeName!}" <#-- 保单归属机构名称 -->
,"riskCode":"${productCode!}" <#-- 险种代码 -->
,"businessNature":"${businessNatureCode!}" <#-- 业务来源 -->
,"startDate":"${startTime!}" <#-- 起保时间 -->
,"endDate":"${endTime!}" <#-- 终保时间 -->
,"sumPremium":"${netPremium!}" <#-- 不含税保费 -->
,"premium":"${premium!}" <#-- 含税保费 -->
,"licenseNo":"<#if plcCar05??>${plcCar05.licensePlateNo!}</#if>" <#-- 车牌号 -->
,"frameNo":"<#if plcCar05??>${plcCar05.frameNo!}</#if>" <#-- 车架号 -->
,"modelCode":"<#if plcCar05??>${plcCar05.vehicleId!}</#if>" <#-- 车型 -->
,"newVehicleFlag":"<#if plcCar05??>${plcCar05.newVehicleFlag!}</#if>" <#-- 新车标识 -->
,"appliName":"<#if plcApplicant??><#list plcApplicant as s1>${s1.customerName!}<#if plcApplicant?size-1 gt s1?index >|</#if></#list></#if>" <#-- 投保人名称 -->
,"insuredName":"<#if plcPublicInsurant??><#list plcPublicInsurant as s1>${s1.customerName!}<#if plcPublicInsurant?size-1 gt s1?index >|</#if></#list></#if>" <#-- 被保人名称 -->
,"newPolicyFlag":"${newPolicyFlag!}" <#-- 新保标识 -->
,"autoTransreNewFlag":"${autoTransrenewFlag!}" <#-- 自动续保标识 -->
,"transferPolicyFlag":"${transferPolicyFlag!}" <#-- 转保标识 -->
,"transreNewFlag":"${transrenewFlag!}" <#-- 续保标识 -->
,"artifSelfPricesRat":"<#if plcSolution??><#list plcSolution as s1>${s1.PlcRation.artifSelfPricesRat!}<#if plcSolution?size-1 gt s1?index >|</#if></#list></#if>" <#-- 自主定价系数 -->
,"artifReviewPrem":"<#if plcSolution??><#list plcSolution as s1>${s1.PlcRation.artifReviewPrem!}<#if plcSolution?size-1 gt s1?index >|</#if></#list></#if>" <#-- 总保费 -->
,"agentFee":"<#if plcSolution??><#list plcSolution as s1><#if s1.plcCommissionDetail??><#list s1.plcCommissionDetail as item>${item.agentFee!}<#if s1.plcCommissionDetail?size-1 gt item?index >|</#if></#list></#if></#list></#if>" <#-- 手续费含税金额 -->
,"agentNetFee":"<#if plcSolution??><#list plcSolution as s1><#if s1.plcCommissionDetail??><#list s1.plcCommissionDetail as item>${item.agentNetFee!}<#if s1.plcCommissionDetail?size-1 gt item?index >|</#if></#list></#if></#list></#if>" <#-- 手续费不含税金额 -->
,"agentComCode":"${saleaman!}" <#-- 代理机构代码 -->
,"agentComName":"${saleamanName!}" <#-- 代理机构名称 -->
,"newChnlType":"${businessChannelCode!}" <#-- 清分后渠道 -->
,"carKindCode":"<#if plcCar05??>${plcCar05.carKindCode!}</#if>" <#-- 车辆种类 -->
,"useNatureCode":"<#if plcCar05??>${plcCar05.carUserNatureCode!}</#if>" <#-- 车辆使用性质 -->
,"policySort":"${policySort!}" <#-- 保单种类 -->
,"actualvalue":"<#if plcCar05??>${plcCar05.actualvalue!}</#if>" <#-- 实际价值 -->
,"businessType":"${businessType!}" <#-- 业务类型-->
}]
}
...
...
XF_DWD/新核心车险批单-FM.ftl
View file @
edf6bbcb
This diff is collapsed.
Click to expand it.
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_分渠道未决赔款.sql
View file @
edf6bbcb
...
...
@@ -16,7 +16,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -37,7 +37,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -58,7 +58,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -79,7 +79,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -100,7 +100,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_分险类未决赔款.sql
View file @
edf6bbcb
...
...
@@ -15,7 +15,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -36,7 +36,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -57,7 +57,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -78,7 +78,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -99,7 +99,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_未决赔款(合并).sql
View file @
edf6bbcb
...
...
@@ -17,7 +17,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
;
...
...
@@ -34,7 +34,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL1COMCODE`
...
...
@@ -52,7 +52,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL2COMCODE`
...
...
@@ -71,7 +71,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL3COMCODE`
...
...
@@ -90,7 +90,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL4COMCODE`
...
...
@@ -114,7 +114,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -135,7 +135,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -156,7 +156,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -177,7 +177,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -198,7 +198,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`classcode`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -226,7 +226,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -247,7 +247,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -268,7 +268,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -289,7 +289,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
@@ -310,7 +310,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
and
s1
.
`chnl`
is
not
null
group
by
s1
.
`setdate`
...
...
ZB_DM/理赔指标/方案一(直接计算)/未决赔款/ZB_DM_未决赔款.sql
View file @
edf6bbcb
...
...
@@ -9,7 +9,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
;
...
...
@@ -26,7 +26,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL1COMCODE`
...
...
@@ -44,7 +44,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL2COMCODE`
...
...
@@ -63,7 +63,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL3COMCODE`
...
...
@@ -82,7 +82,7 @@ select
from
ZB_ODS
.
ZB_ODS_KAFKA
.
LPDATA
s1
where
s1
.
`COMNAME`
is
not
null
and
LEFT
(
s1
.
`setdate`
,
8
)
=
DATE_FORMAT
(
LOCALTIMESTAMP
,
'yyyyMMdd'
)
and
s1
.
`flag`
=
'wj'
and
s1
.
`flag`
in
(
'wj'
,
'yjwj'
)
group
by
s1
.
`setdate`
,
s1
.
`LEVEL4COMCODE`
...
...
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