[Koha-devel] Active borrowers report

Mike Hafen mdhafen at tech.washk12.org
Mon Jan 9 23:06:57 CET 2012


Cool.  Though I would prefer Jesse Weaver get all/joint credit for it.  I
really just changed his sql a bit.

On Mon, Jan 9, 2012 at 2:31 PM, Liz Rea <lrea at nekls.org> wrote:

> And you know what, that one isn't in the report library so I added it for
> you. :)
>
> You can see it here:
> http://wiki.koha-community.org/wiki/SQL_Reports_Library#Active_Patrons
>
> Thanks!
>
> Liz Rea
> lrea at nekls.org
>
>
>
>
> On Jan 9, 2012, at 2:36 PM, Mike Hafen wrote:
>
> > SELECT YEAR(issuedate), MONTH(issuedate), categorycode, COUNT(DISTINCT
> borrowernumber)
> > FROM (
> >   SELECT issuedate, borrowernumber FROM old_issues
> >  UNION ALL
> >   SELECT issuedate, borrowernumber FROM issues
> > ) AS all_issues
> > LEFT JOIN borrowers USING (borrowernumber)
> > GROUP BY YEAR(issuedate), MONTH(issuedate), categorycode
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20120109/14af3846/attachment.htm>


More information about the Koha-devel mailing list