Can someone help me out here. I need to alter this to show only titles
that haven't circulated in X number of years.


SELECT b.title, b.author, b.copyrightdate, i.itemcallnumber,
i.barcode, i.datelastborrowed, i.issues as totalcheckouts,
i.dateaccessioned
FROM items i
LEFT JOIN issues
USING (itemnumber)
LEFT JOIN biblio b
USING (biblionumber)
WHERE i.itemnumber NOT IN (SELECT issues.itemnumber FROM issues)
UNION
(SELECT b.title, b.author, b.copyrightdate, i.itemcallnumber,
i.barcode, i.datelastborrowed, i.issues as totalcheckouts,
i.dateaccessioned
FROM items i
LEFT JOIN issues
USING (itemnumber)
LEFT JOIN biblio b
USING (biblionumber)
WHERE i.itemnumber NOT IN (SELECT old_issues.itemnumber FROM old_issues))
_______________________________________________
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to