30 Aug
2019
30 Aug
'19
9:25 a.m.
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