select year,sum(NUM) from test group by year order by year