[Koha] Report on Titles in the collection
I want a list of titles having more than one items . Can anyone help me with the SQL query? -- *Regards,* ** *Madhura M.Deodhar* *Librarian *IES Management College and Research Centre VMD Lotlikar Vidya Sankul Opp.Lilavati Hospital, Bandra Reclamation Bandra (West) Mumbai - 50 61378327(direct) 9869385665/9167004647 http://iesmglib.blogspot.com *P **Please consider the environment before printing this e-mail.* * * ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Report on Titles in the collection
Here is the query, what you want :- SELECT items.barcode, biblio.title FROM items LEFT JOIN biblio ON (items.biblionumber=biblio.biblionumber) GROUP BY items.biblionumber HAVING ( COUNT(*) 1 ) On Mon, Aug 26, 2013 at 7:15 AM, Madhura Deodhar IES Library library.m...@gmail.com wrote: I want a list of titles having more than one items . Can anyone help me with the SQL query? -- *Regards,* ** *Madhura M.Deodhar* *Librarian *IES Management College and Research Centre VMD Lotlikar Vidya Sankul Opp.Lilavati Hospital, Bandra Reclamation Bandra (West) Mumbai - 50 61378327(direct) 9869385665/9167004647 http://iesmglib.blogspot.com *P **Please consider the environment before printing this e-mail.* * * ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha //BR Sunil ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Report on Titles in the collection
At 04:45 PM 8/26/2013 +0530, Madhura Deodhar IES Library wrote: I want a list of titles having more than one items . Can anyone help me with the SQL query? Here's one that I wrote for our cataloguers: SELECT CONCAT('a href=\/cgi-bin/koha/catalogue/detail.pl?biblionumber=',items.biblionumber,'\',biblio.title,'/a') AS Title, COUNT(items.itemnumber) AS ItemCount FROM items LEFT JOIN biblio ON (items.biblionumber=biblio.biblionumber) GROUP BY items.biblionumber HAVING (COUNT(*)1) ORDER BY ItemCount DESC; It gives *clickable* (avoids having to do a 'search' to look at the entry) results like: Title ItemCount Encyclopaedia Britannica - 11th edition / 29 Encyclopaedia Britannica (14th ed.) : 24 The Journal of the Royal Aeronautical Society / 23 Royal Victoria Yacht Club publications /23 The great events by famous historians : 22 The Canadian Patent Office record : 21 List of shipping / 19 Best - Paul ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha