[OPEN-ILS-GENERAL] SQL question

Jesse Ephraim JEphraim at roanoketexas.com
Thu Apr 11 14:05:59 EDT 2013


Thanks much, Aaron – I appreciate it!

Jesse Ephraim
Director, Roanoke Public Library

308 S. Walnut
Roanoke, TX  76248
jephraim at roanoketexas.com
817-491-2691

From: open-ils-general-bounces at list.georgialibraries.org [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Aaron Zsembery
Sent: Thursday, April 11, 2013 1:03 PM
To: Evergreen Discussion Group
Subject: Re: [OPEN-ILS-GENERAL] SQL question

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

________________________________
From: "Jesse Ephraim" <JEphraim at roanoketexas.com<mailto:JEphraim at roanoketexas.com>>
To: "Evergreen Discussion Group" <open-ils-general at list.georgialibraries.org<mailto: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<mailto: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/abe89bf2/attachment-0001.htm>


More information about the Open-ils-general mailing list