INSERT INTO procs set name='3.5. Nombre d\'emprunts par titre (sauf périodiques)', requete='SELECT IF(CONCAT(tit1, \" / \", author_name, \", \", author_rejete) IS NULL, tit1, CONCAT(tit1, \" / \", author_name, \", \", author_rejete)) AS Titre, COUNT(*) AS Nombre, expl_cb AS \"Code-barres\" FROM ((exemplaires, pret_archive, notices LEFT JOIN responsability ON notice_id = responsability_notice AND responsability_type=0) LEFT JOIN authors ON responsability_author = author_id) WHERE notice_id=expl_notice AND arc_expl_id=expl_id AND (expl_cb LIKE \'!!NumeroExemplaire!!%\' AND tit1 LIKE \'%!!Titre!!%\' AND author_name LIKE \'%!!Auteur!!%\' ) AND date(arc_debut) BETWEEN \"!!Du!!\" AND \"!!Au!!\" GROUP BY expl_cb ORDER BY 1', comment='Recherche entre deux dates à partir d\'un code-barres ou de mots du titre (sans apostrophe) ou d\'un nom d\'auteur (par titre ou par auteur, plusieurs réponses possibles)', autorisations='1', parameters=' text text text date_box date_box '