[Koha] Class reports

Paul A paul.a at navalmarinearchive.com
Mon Nov 9 13:14:09 NZDT 2015

Could you please try a comma after c.branchcode ?

And let us know the results?


At 12:03 PM 11/9/2015 +1300, library wrote:
>Hi everyone
>I wonder if anyone can help me with my report. I am trying to adapt the
>"Patrons with most checkouts in date range report" to enable me to print
>borrowing statistics by classes which I have as an additional attribute. I
>keep getting an error message
>"You have an error in your SQL syntax; check the manual that corresponds to
>your MySQL server version for the right syntax to use near
>'count(s.borrowernumber) AS checkouts FROM statistics s LEFT JOIN borrowers
>b ' at line 2"
>which is the part I didn't change.
>This is as far as I have got in my report.
>SELECT concat(b.surname,', ',b.firstname) AS name, a.code, a.attribute,
>        count(s.borrowernumber) AS checkouts
>FROM statistics s
>LEFT JOIN borrowers b USING (borrowernumber)
>LEFT JOIN borrower_attributes a USING (borrowernumber)
>WHERE c.branchcode = 'KKC' AND  s.datetime BETWEEN <<Top checkouts BETWEEN
>(yyyy-mm-dd)|date>> AND <<and (yyyy-mm-dd)|date>>
>WHERE a.code = Class AND a.attribute=<<Class>>
>Ann Murphy
>Katikati College
>Koha mailing list  http://koha-community.org
>Koha at lists.katipo.co.nz

Maritime heritage and history, preservation and conservation,
research and education through the written word and the arts.
<http://NavalMarineArchive.com> and <http://UltraMarine.ca>

More information about the Koha mailing list