[Koha] Looking for some report help

Nicole Engard nengard at gmail.com
Tue Oct 22 04:11:54 NZDT 2013


Hi all,

I have this request for a report:

"Can you develop a report that would provide: all the holds for <<a chosen
owning library's>> titles (also showing the item barcodes) on which <<the
same chosen library's>> patrons have holds but which titles are “in
transit" to another library?"

The hold is placed on the biblio level most of the time and and transfer on
the item level - so this report will not be comprehensive because it will
only find item specific holds.

SELECT b.title, b.author, i.itemcallnumber,
       i.barcode, t.tobranch, COUNT(h.biblionumber) AS 'holds'
FROM reserves h
LEFT JOIN borrowers p using (borrowernumber)
LEFT JOIN branchtransfers t USING (itemnumber)
LEFT JOIN items i ON (t.itemnumber=i.itemnumber)
LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber)
WHERE i.homebranch = <<Item's branch|branches>> and
p.branchcode=i.homebranch and p.branchcode != t.tobranch
GROUP BY h.biblionumber
HAVING COUNT(h.biblionumber) > 0
ORDER BY b.title ASC


Is there a way to make it more comprehensive that I'm missing?

Thanks
Nicole


More information about the Koha mailing list