INSERT INTO procs set name='3.1. Liste des titres les plus empruntés (sauf périodiques)', requete='SELECT IF(CONCAT(tit1, \" / \", author_name, \", \", author_rejete) IS NULL, tit1, CONCAT(tit1, \" / \", author_name, \", \", author_rejete)) AS \'Titre / Auteur\', COUNT(distinct arc_id) AS \'Nombre de prêts\' FROM (( pret_archive left join notices on arc_expl_notice=notice_id LEFT JOIN responsability ON notice_id = responsability_notice AND responsability_type=0) LEFT JOIN authors ON responsability_author = author_id) WHERE date(arc_debut) BETWEEN \"!!Du!!\" AND \"!!Au!!\" and notice_id is not null group by arc_expl_notice ORDER BY 2 desc', comment='Recherche entre deux dates', autorisations='1', parameters=' date_box date_box '