Beräkna först årtiondet för varje rad
select floor(year(`year`) / 10) * 10 as decade
from tbl_people
och använd sedan detta mellanresultat för att räkna SQL Fiddle
select count(*), decade, decade + 9
from (select floor(year(`year`) / 10) * 10 as decade
from tbl_people) t
group by decade
eller denna SQL-fiol , om du vill ha decenniet i en kolumn
select count(*) as count, concat(decade, '-', decade + 9) as year
from (select floor(year(`year`) / 10) * 10 as decade
from tbl_people) t
group by decade