Commit dc7cdc6d authored by 王东's avatar 王东

指标计算承保字段调整

parent f6303fc2
...@@ -12,10 +12,20 @@ SELECT ...@@ -12,10 +12,20 @@ SELECT
, s1.`startTime` as `startTime` , s1.`startTime` as `startTime`
, s1.`risk` as `risk` , s1.`risk` as `risk`
, sum(cast(s1.`cost` as DECIMAL(18, 2))) as `cost` , sum(cast(s1.`cost` as DECIMAL(18, 2))) as `cost`
from ZB_ODS.ZB_ODS_KAFKA.CBDATA from ZB_ODS.ZB_ODS_KAFKA.CBDATA s1
left join ZB_DM.ZB_DM_MYSQL.TEAM for system_time as of s1.proctime as t1
on s1.`uwConclueDate` = s1.`uwConclueDate`
and s1.`LEVEL1COMCODE` = s1.`LEVEL1COMCODE`
and s1.`LEVEL2COMCODE` = s1.`LEVEL2COMCODE`
and s1.`LEVEL3COMCODE` = s1.`LEVEL3COMCODE`
and s1.`LEVEL4COMCODE` = s1.`LEVEL4COMCODE`
and s1.`startTime` = s1.`startTime`
and s1.`risk` = s1.`risk`
and left(t1.log_time,8) = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
where where
`COMNAME` is not null s1.`COMNAME` is not null
and `uwConclueDate` = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd') and s1.`uwConclueDate` = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd')
and LongTimeToStringUDF(s1.log_time,'yyyyMMdd HH') = DATE_FORMAT(LOCALTIMESTAMP,'yyyyMMdd HH')
group by group by
s1.`uwConclueDate` s1.`uwConclueDate`
, s1.`LEVEL1COMCODE` , s1.`LEVEL1COMCODE`
......
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