[Koha] Report guidance

Cab Vinton bibliwho at gmail.com
Sat Feb 22 09:31:07 NZDT 2014


Head slap.

Well, that's what I get for editing one of my old reports too quickly --

It should be b.branchcode = 'PLAISTOW' instead of b.branchcode <> 'PLAISTOW'

Or rather --

WHERE i.homebranch = <<Owning Library|branches>> AND b.branchcode =
<<Borrower Home Branch|branches>>

Sheesh. Long week ...

Thank you, KB.

Cab Vinton
Plaistow PL


On Fri, Feb 21, 2014 at 3:06 PM, Katelyn Browne <kbrowne at ccpcs.org> wrote:
> Hi Cab,
>
> If I understand correctly, you want a list of Plaistow items checked out to
> Plaistow patrons, so you should have b.branchcode = 'PLAISTOW'.
>
> The way you have it set up, it's finding Plaistow books checked out to
> non-Plaistow patrons. (Or is that really what you want, and the numbers are
> still too small?)
>
> --Katelyn.
>
> Katelyn Browne
> Middle/High School Librarian
> Capital City Public Charter School
> 100 Peabody Street NW
> Washington, DC 20011
> (202) 387-0309 x1745
> kbrowne at ccpcs.org
> http://www.ccpcs.org/library/
>
>
> On Fri, Feb 21, 2014 at 2:29 PM, Cab Vinton <bibliwho at gmail.com> wrote:
>>
>> Hi, All --
>>
>> We're in a small consortium of three libraries & I'm trying to write a
>> report providing stats as follows --
>>
>> Checkouts, renewals & local use of materials owned by a particular
>> branch by patrons belonging to a particular branch
>>
>> The following report is generating numbers an order of magnitude too small
>> --
>>
>> SELECT s.datetime, i.itemcallnumber, i.itype, i.ccode, i.barcode,
>> b.categorycode, s.type
>> FROM statistics s
>> LEFT JOIN items i on (i.itemnumber = s.itemnumber)
>> LEFT JOIN borrowers b ON (s.borrowernumber = b.borrowernumber)
>> WHERE i.homebranch = 'PLAISTOW' AND b.branchcode <> 'PLAISTOW' AND
>> s.type in ('issue','renew','localuse') AND s.datetime BETWEEN
>> '2013-01-01' AND '2013-12-31'
>> ORDER BY  i.cn_sort asc, i.itype, i.ccode
>>
>> Grateful for any assistance or pointers.
>>
>> All best,
>>
>> Cab Vinton, Director
>> Plaistow Public Library
>> Plaistow, NH
>> _______________________________________________
>> Koha mailing list  http://koha-community.org
>> Koha at lists.katipo.co.nz
>> http://lists.katipo.co.nz/mailman/listinfo/koha
>
>


More information about the Koha mailing list