select expl_cote as Cote, expl_cb as "Code-barres", 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 from exemplaires left join notices n1 on expl_notice=n1.notice_id 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 where expl_statut=!!param1!! order by expl_cote