[Koha] Catalogue - SQL Report Help

SATISH lis4satish at gmail.com
Fri Jan 23 23:19:28 NZDT 2015


Hello,

Previously I received sql help from Heather Braum, regarding generating
unique records, that was a big help. Now, I am looking for generating sql
report, that is.

Background:
I am using 2 kind of item types -  (1) book and (2) book bank. ( both are
used to catalogue only books)  "Book"- is used for all library users where
as "book bank"- is used for some reserved category of students and
respective circulation rules are made.

Requirement:
Previously provided sql query (by Heather Braum) fetches unique records
(non-repeatable) of only one item type. ( that is =a ) But now I wanted to
have a report which has to merge item type 1 (book) and item type 2 (book
bank)  ( that is = a+b) and then look for unique records from this list.

Can you please help me how to achieve this for generating a report.


Thank You in advance.
Satish MV
Librarian
Govt. Engineering College, Hassan.
Karnataka. INDIA.

Previous sql:
(1)
SELECT DISTINCT b.biblionumber, b.title, b.author, t.editionstatement,
t.publishercode, t.isbn, count(i.itemnumber) FROM biblio b LEFT JOIN
biblioitems t USING(biblionumber) LEFT JOIN items i USING(biblionumber)
GROUP BY b.biblionumber

(2)

> SELECT DISTINCT b.biblionumber, b.title, b.author, t.editionstatement,
> t.publishercode, t.isbn, i.ccode, count(i.itemnumber) FROM biblio b LEFT
> JOIN
> biblioitems t USING(biblionumber) LEFT JOIN items i USING(biblionumber)
> WHERE i.ccode=<<Enter collection code>> GROUP BY b.biblionumber;
>
> Paul
>
>
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>



--


More information about the Koha mailing list