[Evergreen-reports] Average Renewals used

Galen Charlton gmc at equinoxoli.org
Thu Jun 1 14:36:44 EDT 2023


Hi,

On Thu, Jun 1, 2023 at 1:43 PM Elizabeth Davis via Evergreen-reports <
evergreen-reports at list.evergreen-ils.org> wrote:
> I am interested in creating a report template to find the average
> number of renewals used as part of a check out.  Has anyone
> ever done something like this?

I don't think there's a reporting source that can do this directly, nor can
the reporter follow the chain of renewals for a given loan directly.

However, there are stored procedures that can summarize the circulation
chain for each loan, so for a one-shot report the following could be done
via SQL:

-- summarize the circulation chains and put them in a temporary table
CREATE TEMPORARY TABLE circ_chains
AS SELECT action.summarize_circ_chain(id)
FROM action.circulation
WHERE parent_circ IS null
AND xact_start >= '2023-05-01'; -- or whatever; note that summarizing the
circ chains for all loans in a large database will take a while

-- get the average number of renewals
SELECT AVG((summarize_circ_chain).num_circs - 1)AS average_renewals
FROM circ_chains;

Regards,

Galne
--
Galen Charlton
Implementation and IT Manager
Equinox Open Library Initiative
gmc at equinoxOLI.org
https://www.equinoxOLI.org
phone: 877-OPEN-ILS (673-6457)
direct: 770-709-5581
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/evergreen-reports/attachments/20230601/53678a6e/attachment.htm>


More information about the Evergreen-reports mailing list