Skip to main content

Koha SQL: Total Books by Item Type

Count unique titles and physical copies grouped by Koha item type. Copy this query into Koha Staff Interface → Reports → Create from SQL.

SQL Query

SELECT itype, COUNT(DISTINCT biblionumber) AS titles, COUNT(itemnumber) AS copies FROM items WHERE barcode IS NOT NULL GROUP BY itype ORDER BY copies DESC;

Sample Output

codetitlescopies
BK / MAIN14202850
REF / MAIN310345
JRN / PER185620

How to Run in Koha

  1. Log in to the Koha Staff Interface and open Reports.
  2. Click Create from SQL.
  3. Paste the SQL above, give it a clear name, and click Save report.

Contact: mahsandu@gmail.com · 01916303060

Comments

Popular posts from this blog