[Koha] Correct SQL for getting count of active borrowers

Lola McKee lmckee at salpublib.org
Wed Nov 11 08:35:13 NZDT 2009

Can someone tell me the correct SQL to get a count of active borrowers? 
Do I need to pull from issues or old_issues and what is the differences
and or reasoning. 
We used the SQL from Koha SQL Reports Library "List Active Patrons by
Category for a Specific Month" Code = SELECT YEAR(issuedate),
MONTH(issuedate), categorycode, COUNT(DISTINCT borrowernumber) FROM
old_issues LEFT JOIN borrowers USING (borrowernumber) GROUP BY
YEAR(issuedate), MONTH(issuedate), categorycode


Also do we want to use DISTINCT borrowernumber or just borrowernumber?




Lola McKee

Tech Systems Specialist

Salina Public Library

785-825-4624 Ext. 239



P Please consider the environment before printing this e-mail.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20091110/f1993d07/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2556 bytes
Desc: image001.gif
Url : http://lists.katipo.co.nz/pipermail/koha/attachments/20091110/f1993d07/attachment.gif 

More information about the Koha mailing list