select case when arc_empr_year=0 then 'Année de naissance non renseignée' when (year(arc_debut)-arc_empr_year) <=3 then '0 à 3 ans - Petite enfance' when (year(arc_debut)-arc_empr_year) >=4 and (year(arc_debut)-arc_empr_year)<=5 then '4 à 5 ans - Maternelle' when (year(arc_debut)-arc_empr_year) >=6 and (year(arc_debut)-arc_empr_year)<=10 then '6 à 10 ans - Primaire' when (year(arc_debut)-arc_empr_year) >=11 and (year(arc_debut)-arc_empr_year)<=15 then '11 à 15 ans - Jeune' when (year(arc_debut)-arc_empr_year) >=16 and (year(arc_debut)-arc_empr_year)<=25 then '16 à 25 ans - Jeune adulte' when (year(arc_debut)-arc_empr_year) >25 then '+25 ans - Adultes' else 'N/A' END as "Tranche d'âge", count(arc_id) as 'Nombre de prêts' from pret_archive where arc_debut between '!!date1!!' and '!!date2!!' group by 1 order by 1