select location_libelle as Localisation,lender_libelle as Propriétaire,codestat_libelle as Codestat, section_libelle as Section, tdoc_libelle as Support, e0.expl_custom_small_text as Type,expl_cote as Cote, CASE WHEN expl_notice>0 THEN concat(CASE WHEN serie_name IS NOT NULL THEN CONCAT(serie_name, " : ") ELSE "" END, n1.tit1) ELSE CONCAT(n2.tit1," ",bulletin_numero," ") END as Titre,if(categories.num_noeud is null,'',GROUP_CONCAT(distinct concat('[',libelle_thesaurus,']',libelle_categorie) SEPARATOR ', ')) as 'Catégorie',if(a0.author_id is not null,CONCAT(a0.author_name, ' ', a0.author_rejete),'') as 'Auteur principal', ed_name As Editeur, n1.year as "Année d'édition", expl_prix as Prix from expl_custom_values as e0, expl_custom_values as a1, exemplaires left join lenders on expl_owner=idlender left join docs_statut on expl_statut=idstatut left join docs_location on expl_location=idlocation left join docs_section on expl_section=idsection LEFT JOIN docs_type ON idtyp_doc=expl_typdoc LEFT JOIN docs_codestat ON idcode=expl_codestat left join notices n1 on expl_notice=n1.notice_id left join notices_categories on n1.notice_id=notcateg_notice left join categories on (notices_categories.num_noeud=categories.num_noeud and categories.langue='fr_FR') left join thesaurus on categories.num_thesaurus=id_thesaurus left join series on n1.tparent_id=serie_id left join bulletins on expl_bulletin=bulletin_id left join notices n2 on bulletin_notice=n2.notice_id left join publishers on n1.ed1_id=ed_id left join responsability as r0 on (n1.notice_id=r0.responsability_notice and r0.responsability_type=0) left join authors as a0 on a0.author_id=r0.responsability_author where e0.expl_custom_champ=2 and a1.expl_custom_champ=3 and date_format(a1.expl_custom_date,'%Y')='!!annee!!' and a1.expl_custom_origine=e0.expl_custom_origine and expl_id=a1.expl_custom_origine and expl_location in (!!locationn!!) and expl_owner in (!!choixproprio!!) group by n1.notice_id ORDER BY 1,2,3,4,6