Department Wise Number of Book Issues/Renewals with in date wise (Koha SQL Reports Queries)

Department Wise Number of Book Issues/Renewal.
  • Crete the New SQL Report
  • Copy and Paste  following lines in the SQL report. Save and close.


SELECT itemtypes.itemtype,branches.branchname,IFNULL(TotalIssues,'0') AS 'Issues/Renews' FROM itemtypes
JOIN branches
LEFT JOIN
(SELECT t.branchcode, coalesce(statistics.count,0) AS TotalIssues,statistics.itemtype FROM branches t
LEFT JOIN (SELECT s.branch, count(s.datetime) AS count,itemtype FROM statistics s WHERE s.type IN ('issue','renew') AND s.datetime BETWEEN <<between (date)|date>> AND <<and|date>>
GROUP BY s.branch,s.itemtype)statistics ON t.branchcode = statistics.branch)issuestats ON issuestats.itemtype = itemtypes.itemtype AND issuestats.branchcode = branches.branchcode

Run Report

Post a Comment

0 Comments