Commit edf6bbcb authored by 胡涛's avatar 胡涛

指标统计sql脚本

parent 46fac2a1
...@@ -39,8 +39,12 @@ select ...@@ -39,8 +39,12 @@ select
s1.coinsLinkCode , -- 指标新增_联保标志代码 0 非联保 3,主联,4从联 s1.coinsLinkCode , -- 指标新增_联保标志代码 0 非联保 3,主联,4从联
s1.actualId , -- 指标新增_唯一标识需验证 s1.actualId , -- 指标新增_唯一标识需验证
s1.businessNo , -- 业务单号 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 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 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'
...@@ -40,10 +40,13 @@ select ...@@ -40,10 +40,13 @@ select
s1.coinsLinkCode , -- 指标新增_联保标志代码 0 非联保 3,主联,4从联 s1.coinsLinkCode , -- 指标新增_联保标志代码 0 非联保 3,主联,4从联
s1.amount , -- 指标新增_保额 s1.amount , -- 指标新增_保额
s1.actualId , -- 指标新增_唯一标识需验证 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 -- 分公司代码 t1.LEVEL1COMCODE -- 分公司代码
from XF_ODS.XF_ODS_KAFKA.POLICY s1 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 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'
......
...@@ -4,7 +4,8 @@ select ...@@ -4,7 +4,8 @@ select
DATE_FORMAT(LOCALTIMESTAMP,'yyyy-MM-dd HH:mm:ss') as log_time , -- 加工平台处理数据时间 DATE_FORMAT(LOCALTIMESTAMP,'yyyy-MM-dd HH:mm:ss') as log_time , -- 加工平台处理数据时间
t1.LEVEL1COMCODE -- 分公司代码 t1.LEVEL1COMCODE -- 分公司代码
from XF_ODS.XF_ODS_KAFKA.POLICY s1 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.businessOffice = t1.COMCODE 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'
{"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":"流计算平台", "systemName":"流计算平台",
"systemCode":"D030", "systemCode":"D030",
"sendTime":"${.now?string("yyyy-MM-dd HH:mm:ss")}", "sendTime":"${.now?string("yyyy-MM-dd HH:mm:ss")}",
"msgCode":"carpolicy", "msgCode":"carpolicy",
"msgName":"新核心车险保单信息", "msgName":"新核心车险保单信息",
"data":[{ "data":[{
"policyNo":"${policyNo!}" <#-- 保单号 --> "policyNo":"${policyNo!}" <#-- 保单号 -->
,"businessNo":"${businessNo!}" <#-- 业务号 --> ,"businessNo":"${businessNo!}" <#-- 业务号 -->
,"underWriteEndDate":"${policyCreatDate!}" <#-- 核保通过时间 --> ,"underWriteEndDate":"${policyCreatDate!}" <#-- 核保通过时间 -->
,"comCode":"${businessOffice!}" <#-- 保单归属机构代码 --> ,"comCode":"${businessOffice!}" <#-- 保单归属机构代码 -->
,"comName":"${businessOfficeName!}" <#-- 保单归属机构名称 --> ,"comName":"${businessOfficeName!}" <#-- 保单归属机构名称 -->
,"riskCode":"${productCode!}" <#-- 险种代码 --> ,"riskCode":"${productCode!}" <#-- 险种代码 -->
,"businessNature":"${businessNatureCode!}" <#-- 业务来源 --> ,"businessNature":"${businessNatureCode!}" <#-- 业务来源 -->
,"startDate":"${startTime!}" <#-- 起保时间 --> ,"startDate":"${startTime!}" <#-- 起保时间 -->
,"endDate":"${endTime!}" <#-- 终保时间 --> ,"endDate":"${endTime!}" <#-- 终保时间 -->
,"sumPremium":"${netPremium!}" <#-- 不含税保费 --> ,"sumPremium":"${netPremium!}" <#-- 不含税保费 -->
,"premium":"${premium!}" <#-- 含税保费 --> ,"premium":"${premium!}" <#-- 含税保费 -->
,"licenseNo":"<#if plcCar05??>${plcCar05.licensePlateNo!}</#if>" <#-- 车牌号 --> ,"licenseNo":"<#if plcCar05??>${plcCar05.licensePlateNo!}</#if>" <#-- 车牌号 -->
,"frameNo":"<#if plcCar05??>${plcCar05.frameNo!}</#if>" <#-- 车架号 --> ,"frameNo":"<#if plcCar05??>${plcCar05.frameNo!}</#if>" <#-- 车架号 -->
,"modelCode":"<#if plcCar05??>${plcCar05.vehicleId!}</#if>" <#-- 车型 --> ,"modelCode":"<#if plcCar05??>${plcCar05.vehicleId!}</#if>" <#-- 车型 -->
,"newVehicleFlag":"<#if plcCar05??>${plcCar05.newVehicleFlag!}</#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>" <#-- 投保人名称 --> ,"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>" <#-- 被保人名称 --> ,"insuredName":"<#if plcPublicInsurant??><#list plcPublicInsurant as s1>${s1.customerName!}<#if plcPublicInsurant?size-1 gt s1?index >|</#if></#list></#if>" <#-- 被保人名称 -->
,"newPolicyFlag":"${newPolicyFlag!}" <#-- 新保标识 --> ,"newPolicyFlag":"${newPolicyFlag!}" <#-- 新保标识 -->
,"autoTransreNewFlag":"${autoTransrenewFlag!}" <#-- 自动续保标识 --> ,"autoTransreNewFlag":"${autoTransrenewFlag!}" <#-- 自动续保标识 -->
,"transferPolicyFlag":"${transferPolicyFlag!}" <#-- 转保标识 --> ,"transferPolicyFlag":"${transferPolicyFlag!}" <#-- 转保标识 -->
,"transreNewFlag":"${transrenewFlag!}" <#-- 续保标识 --> ,"transreNewFlag":"${transrenewFlag!}" <#-- 续保标识 -->
,"artifSelfPricesRat":"<#if plcSolution??><#list plcSolution as s1>${s1.PlcRation.artifSelfPricesRat!}<#if plcSolution?size-1 gt s1?index >|</#if></#list></#if>" <#-- 自主定价系数 --> ,"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>" <#-- 总保费 --> ,"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>" <#-- 手续费含税金额 --> ,"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>" <#-- 手续费不含税金额 --> ,"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!}" <#-- 代理机构代码 --> ,"agentComCode":"${saleaman!}" <#-- 代理机构代码 -->
,"agentComName":"${saleamanName!}" <#-- 代理机构名称 --> ,"agentComName":"${saleamanName!}" <#-- 代理机构名称 -->
,"newChnlType":"${businessChannelCode!}" <#-- 清分后渠道 --> ,"newChnlType":"${businessChannelCode!}" <#-- 清分后渠道 -->
,"carKindCode":"<#if plcCar05??>${plcCar05.carKindCode!}</#if>" <#-- 车辆种类 --> ,"carKindCode":"<#if plcCar05??>${plcCar05.carKindCode!}</#if>" <#-- 车辆种类 -->
,"useNatureCode":"<#if plcCar05??>${plcCar05.carUserNatureCode!}</#if>" <#-- 车辆使用性质 --> ,"useNatureCode":"<#if plcCar05??>${plcCar05.carUserNatureCode!}</#if>" <#-- 车辆使用性质 -->
,"policySort":"${policySort!}" <#-- 保单种类 --> ,"policySort":"${policySort!}" <#-- 保单种类 -->
,"actualvalue":"<#if plcCar05??>${plcCar05.actualvalue!}</#if>" <#-- 实际价值 --> ,"actualvalue":"<#if plcCar05??>${plcCar05.actualvalue!}</#if>" <#-- 实际价值 -->
,"businessType":"${businessType!}" <#-- 业务类型--> ,"businessType":"${businessType!}" <#-- 业务类型-->
}] }]
} }
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ select ...@@ -16,7 +16,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -37,7 +37,7 @@ select ...@@ -37,7 +37,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -58,7 +58,7 @@ select ...@@ -58,7 +58,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -79,7 +79,7 @@ select ...@@ -79,7 +79,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -100,7 +100,7 @@ select ...@@ -100,7 +100,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
......
...@@ -15,7 +15,7 @@ select ...@@ -15,7 +15,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -36,7 +36,7 @@ select ...@@ -36,7 +36,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -57,7 +57,7 @@ select ...@@ -57,7 +57,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -78,7 +78,7 @@ select ...@@ -78,7 +78,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -99,7 +99,7 @@ select ...@@ -99,7 +99,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
......
...@@ -17,7 +17,7 @@ select ...@@ -17,7 +17,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
; ;
...@@ -34,7 +34,7 @@ select ...@@ -34,7 +34,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL1COMCODE` ,s1.`LEVEL1COMCODE`
...@@ -52,7 +52,7 @@ select ...@@ -52,7 +52,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL2COMCODE` ,s1.`LEVEL2COMCODE`
...@@ -71,7 +71,7 @@ select ...@@ -71,7 +71,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL3COMCODE` ,s1.`LEVEL3COMCODE`
...@@ -90,7 +90,7 @@ select ...@@ -90,7 +90,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL4COMCODE` ,s1.`LEVEL4COMCODE`
...@@ -114,7 +114,7 @@ select ...@@ -114,7 +114,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -135,7 +135,7 @@ select ...@@ -135,7 +135,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -156,7 +156,7 @@ select ...@@ -156,7 +156,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -177,7 +177,7 @@ select ...@@ -177,7 +177,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -198,7 +198,7 @@ select ...@@ -198,7 +198,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`classcode` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -226,7 +226,7 @@ select ...@@ -226,7 +226,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -247,7 +247,7 @@ select ...@@ -247,7 +247,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -268,7 +268,7 @@ select ...@@ -268,7 +268,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -289,7 +289,7 @@ select ...@@ -289,7 +289,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
...@@ -310,7 +310,7 @@ select ...@@ -310,7 +310,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') 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 and s1.`chnl` is not null
group by group by
s1.`setdate` s1.`setdate`
......
...@@ -9,7 +9,7 @@ select ...@@ -9,7 +9,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
; ;
...@@ -26,7 +26,7 @@ select ...@@ -26,7 +26,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL1COMCODE` ,s1.`LEVEL1COMCODE`
...@@ -44,7 +44,7 @@ select ...@@ -44,7 +44,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL2COMCODE` ,s1.`LEVEL2COMCODE`
...@@ -63,7 +63,7 @@ select ...@@ -63,7 +63,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL3COMCODE` ,s1.`LEVEL3COMCODE`
...@@ -82,7 +82,7 @@ select ...@@ -82,7 +82,7 @@ select
from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1 from ZB_ODS.ZB_ODS_KAFKA.LPDATA s1
where s1.`COMNAME` is not null where s1.`COMNAME` is not null
and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and LEFT(s1.`setdate`,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and s1.`flag`= 'wj' and s1.`flag`in ('wj','yjwj')
group by group by
s1.`setdate` s1.`setdate`
,s1.`LEVEL4COMCODE` ,s1.`LEVEL4COMCODE`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment