精度保留位数6位,整数部分位数+小数部分位数<=19
SELECT
cast(SUM(contract_amount) AS DECIMAL(19, 6)) AS frequency,
SUBSTR(create_time,1,7) as month
FROM
contract
where
AND is_delete = 0
AND is_enable = 1
GROUP BY SUBSTR(create_time,1,7)
HAVING month >= #{startMonth} and month <= #{endMonth}
ORDER BY month