On Wed, 15 Aug 2018 09:43:50 -0400 Cab Vinton <[email protected]> wrote:
> Figured a subquery would work as a way to first restrict the results > to records where Branch A owns at least one copy, & then to perform > the search for duplicate records on the resulting subset. Oh I see. So do you mean something like SELECT GROUP_CONCAT(b.biblionumber SEPARATOR ', ') AS biblionumbers, b.title, b.author, GROUP_CONCAT(i.isbn SEPARATOR ', ') AS isbns FROM biblio b WHERE b.biblionumber IN (SELECT m.biblionumber FROM items m WHERE m.homebranch = <<Library|branches>> ) LEFT JOIN biblioitems i ON (i.biblionumber=b.biblionumber) GROUP BY CONCAT(substr(b.title,0,9),"/",i.isbn) HAVING COUNT(CONCAT(substr(b.title,0,9),"/",i.isbn))>1 ? That's probably horribly inefficient and I've not tested it because I suspect I've still misunderstood. Hope that helps, -- MJR http://mjr.towers.org.uk/ Member of http://www.software.coop/ (but this email is my personal view only) _______________________________________________ Koha mailing list http://koha-community.org [email protected] https://lists.katipo.co.nz/mailman/listinfo/koha

