Hi, All -- Think the version below should do what we're looking for. (Thank you, Barton!)
All best, Cab Vinton SELECT b.biblionumber, SUBSTRING_INDEX(m.isbn, ' ', 1) AS isbn, b.title, i.homebranch, i.itemcallnumber FROM items i LEFT JOIN biblioitems m USING (biblioitemnumber) LEFT JOIN biblio b ON i.biblionumber = b.biblionumber WHERE i.itype = 'NEWBOOK' AND exists( select * from items where items.itemnumber = i.itemnumber AND DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= dateaccessioned ) GROUP BY b.biblionumber HAVING isbn != "" AND count(i.homebranch) > 1 ORDER BY rand() LIMIT 7 _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha