test group by type and year