|
|
@ -21,16 +21,16 @@ |
|
|
|
SELECT svr.rebateTypeKey, |
|
|
|
svr.rebateTypeValue, |
|
|
|
SUM(svr.estimateRebate) withRebate, |
|
|
|
SUM(svr.expectTreatCost) as expectTreatCost, |
|
|
|
SUM(svr.expectSuppCost) as expectSuppCost, |
|
|
|
COUNT(*) num, |
|
|
|
SUM(svr.expectTreatCost) as expectTreatCost, |
|
|
|
SUM(svr.expectSuppCost) as expectSuppCost, |
|
|
|
COUNT(*) num, |
|
|
|
GROUP_CONCAT(svrw.vehRebateSid) vehRebateSid, |
|
|
|
svr.purchaseSystemName, |
|
|
|
svr.brandName |
|
|
|
FROM scm_veh_rebate_with svrw |
|
|
|
LEFT JOIN scm_veh_rebate svr |
|
|
|
ON svr.sid = svrw.vehRebateSid |
|
|
|
LEFT JOIN scm_veh_rebate svr |
|
|
|
ON svr.sid = svrw.vehRebateSid |
|
|
|
WHERE svrw.mainSid = #{sid} |
|
|
|
GROUP BY svr.calculationModeKey |
|
|
|
GROUP BY svr.brandSid, svr.rebateTypeValue, svr.purchaseSystemSid |
|
|
|
</select> |
|
|
|
</mapper> |