SELECT count(*) as "Nbre", case when empr_sexe='1' then 'Hommes' when empr_sexe='2' then 'Femmes' else 'Non précisé' end as "Sexe", CASE WHEN  (!!param1!! - empr_year) <= 14 THEN 'Jusque 14 ans' WHEN (!!param1!! - empr_year) >14 and (!!param1!! - empr_year) <= 24 THEN '15 à 24 ans' WHEN (!!param1!! - empr_year) >24 and (!!param1!! - empr_year) <= 59 THEN '25 à 59 ans' WHEN (!!param1!! - empr_year) >59 THEN '60 ans et plus'  ELSE 'erreur sur age' END as "Tranche âge", empr_ville as "Ville" 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!!)) and empr_categ not in (9,10,11) group by sexe, "Tranche âge", empr_ville order by Sexe, empr_ville, "Tranche âge"