select alt, count(alt) from ( select ((case when hire_date > (sysdate - to_yminterval('12-0')) then 'Neuling' when hire_date > (sysdate - to_yminterval('15-0')) then 'Mittelding' else 'Alter Sack' end)) alt from employees) group by alt