Get sum of amount monthly
This query should accomplish your goal.

Select YEAR(fromDate) [Year], MONTH(fromDate) [Month], SUM(amount) [Amount]
FROM '__example__'
GROUP BY YEAR(fromDate), MONTH(fromDate)
ORDER BY Year, Month