SELECT location_libelle as Localisation, left(expl_cote,3) as Cote, count(expl_id) FROM exemplaires LEFT JOIN docs_location ON idlocation=expl_location WHERE expl_location in (!!locationn!!) GROUP BY Localisation, Cote ORDER BY Localisation, Cote