seem you need order by date and month
select t.year, t.monthname, t.amounts
from(
SELECT monthname(date_added) as monthname,
month(date_added) month,
year(date_added) as year,
SUM(amount) as amounts
FROM incomes
GROUP BY year, month, monthname
)
ORDER BY t.year, t.month
or if you need two separated result for this year and the previous year
for actual year you could
select t.year, t.monthname, t.amounts
from(
SELECT monthname(date_added) as monthname,
month(date_added) month,
year(date_added) as year,
SUM(amount) as amounts
FROM incomes
where year(date_added) = year(curdate())
GROUP BY year, month, monthname
)
ORDER BY t.year, t.month
and for the previous year you could
select t.year, t.monthname, t.amounts
from(
SELECT monthname(date_added) as monthname,
month(date_added) month,
year(date_added) as year,
SUM(amount) as amounts
FROM incomes
where year(date_added) = year(curdate()) -1
GROUP BY year, month, monthname
)
ORDER BY t.year, t.month