获取当月创建时间月份与当前月一致的记录,统计amount总和
SELECT date_format(create_time, '%Y-%m') AS m,sum(amount) monthSalary FROM t_details
WHERE date_format(create_time, '%Y-%m') = date_format(now(), '%Y-%m') AND cid = 35 AND type = 1
GROUP BY m DESC LIMIT 1