select a0.expl_custom_small_text as Type,count(distinct a1.expl_custom_origine) as Total from expl_custom_values as a0, expl_custom_values as a1, exemplaires where a0.expl_custom_champ=2 and a1.expl_custom_origine=a0.expl_custom_origine and expl_id=a1.expl_custom_origine group by a0.expl_custom_small_text