Login  Register

Re: Counting records - items

Posted by Verus Open Source Support on May 31, 2012; 10:45am
URL: http://ngl.70.s1.nabble.com/Counting-records-items-tp6811195p7572836.html

Query 1:
To know the sub locations and their ids

select * from catalogue_sublocation;

Query 2:
To know number of titles under a sub location

select count(*) from library_holdings where sublocation_id=1

In above query replace 1 with a id of the sub location desired

Query 3:
Items under a sub locations

select count(*) from document a, cat_volume b, library_holdings c where a.volume_id=b.volume_id and b.cataloguerecordid=c.cataloguerecordid and b.owner_library_id=c.owner_library_id and a.library_id=c.holdings_library_id and c.sublocation_id=1



On 05/31/2012 03:38 PM, pedroparkero [via NewGenLib] wrote:
Yes, an SQL query will do fine.
-------------------------------------------------
With great knowledge comes great responsibility.



If you reply to this email, your message will be added to the discussion below:
http://forums.newgenlib.org/Counting-records-items-tp6811195p7572835.html
To start a new topic under NewGenLib, email [hidden email]
To unsubscribe from NewGenLib, click here.
NAML


-- 
Regards
NewGenLib Open Source Support Team
NewGenLib Open Source Support
Verus Solutions Private Limited
www.verussolutions.biz