SELECT CONCAT('<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=',b.biblionumber,'">Notice</a>') AS 'Notice', b.title AS 'Titre', b.author AS 'Auteur', MIN(i.withdrawn_on) AS 'Pilon depuis', COUNT(i.itemnumber) AS 'Nb exemplaires' FROM items i JOIN biblio b ON(i.biblionumber = b.biblionumber) WHERE b.biblionumber IN ( SELECT biblionumber FROM items GROUP BY biblionumber HAVING COUNT(itemnumber) > 0 AND COUNT(IF(withdrawn = 1,1,NULL)) = COUNT(itemnumber) ) AND i.homebranch LIKE <<Site|branches:all>> AND IF(i.withdrawn_on,DATE(i.withdrawn_on),'2000-01-01') BETWEEN <<Piloné entre|date>> AND <<et|date>> GROUP BY i.biblionumber ORDER BY i.withdrawn_on DESC
Cette requête permet de lister les notices dont le dernier exemplaire a récemment été mis en pilon. Ce qui permet d’envisager la suppression de la notice.