SELECT CONVERT( VARCHAR ( 7 ), [FUNDDEALDATE], 120 ) AS FUNDDEALDATE, SUM ( d.fundsum ) AS TRADITIONGETMONEY FROM ODBusiness.DBO.ONCONTRACT C LEFT JOIN ODBusiness.DBO.OnContractFee D ON C.CODE=D.ContractCode WHERE DATEDIFF( MONTH, d.FUNDDEALDATE,'${dateinmonth(CONCATENATE(year,"-",month,"-1"),-1)}' ) <= 11 AND CODE NOT LIKE ('%总包%') GROUP BY CONVERT ( VARCHAR ( 7 ), [FUNDDEALDATE], 120 ) |