SELECT count(*), CASE WHEN  (!!param1!! - empr_year) <= 13 THEN 'Jusque 13 ans' WHEN (!!param1!! - empr_year) >13 and (!!param1!! - empr_year)<=24 THEN '14 à 24 ans' WHEN (!!param1!! - empr_year)>24 and (!!param1!! - empr_year)<=59 THEN '25 à 29 ans' WHEN (!!param1!! - empr_year)>59 THEN '60 ans et plus'  ELSE 'erreur sur age' END as categ_age from empr where (year(empr_date_adhesion)=!!param1!! or year(empr_date_expiration)=!!param1!! or (year(empr_date_expiration)>=!!param1!! and year(empr_date_adhesion)<=!!param1!!))  group by categ_age