SQL - Library Books Investment by Collection Code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SQL - Library Books Investment by Collection Code

satishamv
Hi,

As per our Library reporting requirements, I have just prepared
SQL on "Library Books investments by Collection Code".
I thought of sharing it, because it is useful for Engineering College
Libraries in India for AICTE reports preparation.
I did not find it in SQL Library and if somebody is already added,
kindly share the sql link.

-------------------------
SELECT
ccode AS Collection Code,
COUNT(DISTINCT items.biblionumber) AS 'No of Titles',
COUNT(itemnumber) AS 'No of Volumes',
SUM(price) AS 'Investment or total expenditure'
FROM items
GROUP BY ccode
----------------------------

Result:

Collection | No of Titles | No of Volumes | Investment or Price
CSE | 305 | 2110 | 994267.50


With Thanks
Satish MV
Librarian
Govt. Engineering College, Hassan
Karnataka
www.gechassan.ac.in

--
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: SQL - Library Books Investment by Collection Code

satishamv
Koha 16.11.11 / Package Installation/ Ubuntu 14.04 Desktop with
MySQL -  mysql Ver 14.14 Distrib 5.5.57, for debian-linux-gnu (i686) using
readline 6.3 (from About Koha page)

Library Books investments by "Collection Code" for a single library/default
library.
-------------------------
SELECT
ccode AS 'Collection Code',
COUNT(DISTINCT items.biblionumber) AS 'No of Titles',
COUNT(itemnumber) AS 'No of Volumes',
SUM(price) AS 'Investment or total expenditure in Rs.'
FROM items
GROUP BY ccode
----------------------------
Output,

https://ibb.co/kyRueb

with thanks
Satish
_______________________________________________
Koha mailing list  http://koha-community.org
[hidden email]
https://lists.katipo.co.nz/mailman/listinfo/koha