Wow, that's an old report. Glad you got some use out of it, and found a way to make it better! On the other hand, should we consider promoting the use of the `statistics` table? Though I've been out of the loop, I think it was easier to design reports like this around. Spent many frustrating hours and LEFT JOINs trying to twist the `issues` and `old_issues` tables into the output the librarians asked for. 2012/1/9 Mike Hafen <mdhafen@tech.washk12.org>
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@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@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
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Jesse Weaver