[Koha] Top 10 Circulating Books

Ma. Victoria H. Silva-Manuel mavicsilva at gmail.com
Fri Aug 30 20:25:47 NZST 2019


HI.

I got the SQL report below to generate the top 10 circulating books from
koha-community.

SELECT count(s.datetime) AS circs, b.title, b.author,
       i.ccode FROM statistics sJOIN items i ON
(i.itemnumber=s.itemnumber) LEFT JOIN biblio b ON
(b.biblionumber=i.biblionumber) WHERE DATE(s.datetime) >
DATE_SUB(CURRENT_DATE(),INTERVAL 6 MONTH)
      AND DATE(s.datetime)<=CURRENT_DATE() AND
      s.itemnumber IS NOT NULL AND s.type IN ('issue','renew')GROUP BY
b.biblionumber ORDER BY circs DESC LIMIT 10


How can we add date range and branch filter?

Thank you.

-- 
Ma. Victoria H. Silva-Manuel
Registered Librarian, 3892


More information about the Koha mailing list