[OPEN-ILS-GENERAL] SQL question

Aaron Zsembery azsembery at pls-net.org
Thu Apr 11 14:02:59 EDT 2013


You want the action.circulation table. 

I would use the following query: 
SELECT COUNT(action.circulation.id) AS Circs 
FROM action.circulation 
WHERE DATE(xact_start) BETWEEN '2012-01-01' AND '2012-12-31' 
AND circ_lib = XXX /*Put your library ID in here, it can be found in actor.org_unit.id*/ 
AND phone_renewal IS FALSE /*Remove this if you want Phone renewals to be counted*/ 
AND desk_renewal IS FALSE /*Remove this if you want Circ Desk renewals to be counted*/ 
AND opac_renewal IS FALSE /*Remove this if you want OPAC renewals to be counted*/; 

Aaron Z 
Jr. Systems Administrator 

Pioneer Library System 
2557 State Rt. 21 
Canandaigua, New York 14424 
Phone: (585) 394-8260 

----- Original Message -----

> From: "Jesse Ephraim" <JEphraim at roanoketexas.com>
> To: "Evergreen Discussion Group"
> <open-ils-general at list.georgialibraries.org>
> Sent: Thursday, April 11, 2013 1:36:47 PM
> Subject: [OPEN-ILS-GENERAL] SQL question

> I need to count (via SQL) the number of checkout transactions that
> fall with 1/1/2012 and 12/31/2012. Could someone point me at the
> right table/fields to look at checkout transactions for my library
> (we are in a consortium).

> Thanks!

> Jesse Ephraim
> Director, Roanoke Public Library

> 308 S. Walnut
> Roanoke, TX 76248
> jephraim at roanoketexas.com
> 817-491-2691
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20130411/888e0aca/attachment.htm>


More information about the Open-ils-general mailing list