我有这个 mysql 查询
SELECT YEAR(date_entered), MONTHNAME(date_entered), SUM(amount)
FROM opportunities
GROUP BY YEAR(date_entered), MONTH(date_entered);
这带回了这些数据
"year(date_entered)","monthname(date_entered)","sum(amount)"
"2009","March","9038714.77"
"2009","April","2205819"
"2009","May","9706852.6"
我需要做的是显示差异?例如,三月是 903,四月是 220,所以差值为 680,依此类推,所以最新的总和值减去宝贵的月份值?
提前致谢