[Koha] Another report help question

Nicole Engard nengard at gmail.com
Fri May 16 15:30:57 NZST 2014


I have this report that shows me item with no checkouts in a number of
days, but how about showing items with fewer than X checkouts in that same
number of days?

SELECT b.title, b.author, i.itemcallnumber, i.barcode, i.datelastseen,
i.datelastborrowed, i.issues as 'total checkouts ever', i.renewals as
'total renewals ever'
FROM biblio b
JOIN items i USING (biblionumber)
WHERE i.itemnumber NOT IN
     (SELECT DISTINCT itemnumber
      FROM statistics
      WHERE type = 'issue' AND
      (TO_DAYS(curdate())-TO_DAYS(datetime)) > <<No checkouts in X days>>)
and i.dateaccessioned <= <<Acquired on or before (yyyy-mm-dd)|date>>


More information about the Koha mailing list