User Tools

Site Tools


evergreen-reports:monthlycircstatreports

This is an old revision of the document!


Monthly Circulation Statistical Reports

Monthly Circulation Stat Report by Statistical Category and Library

Submission Notes: This report was submitted on 5/19/10 by Amy Terlaga of Bibliomation, Inc. It was originally created by Dan Scott of Laurentian University. Version: Evergreen v.1.6.0.2 Data Sources Used: Running Tips/Guidelines: This report is designed to be run the day/month AFTER the month you are interested in getting monthly circulation totals. If you would like it to reflect this month's activity, remove - '1 month'::interval If you would like it to reflect activity from two months ago, change the 1 to a 2 (and so on). Where you see ORG, replace with your org unit's short name.


SELECT aou.name AS "Library", asceum.stat_cat_entry AS "Borrower Stat", count(acirc.id) AS "COUNT" FROM action.circulation acirc JOIN actor.org_unit aou ON acirc.circ_lib = aou.id LEFT OUTER JOIN actor.stat_cat_entry_usr_map asceum ON asceum.target_usr = acirc.usr LEFT OUTER JOIN actor.stat_cat astat ON asceum.stat_cat = astat.id WHERE aou.shortname = 'ORG'::text AND date_trunc('MONTH'::text, acirc.create_time) = date_trunc('MONTH'::text, now() - '1 mon'::interval) GROUP BY aou.name, asceum.stat_cat_entry

UNION

SELECT 'ZZZ Total' AS "Library", '' AS "Borrower Stat", count(acirc.id) AS "COUNT" FROM action.circulation acirc JOIN actor.org_unit aou ON acirc.circ_lib = aou.id LEFT OUTER JOIN actor.stat_cat_entry_usr_map asceum ON asceum.target_usr = acirc.usr LEFT OUTER JOIN actor.stat_cat astat ON asceum.stat_cat = astat.id WHERE aou.shortname = 'ORG'::text AND date_trunc('MONTH'::text, acirc.create_time) = date_trunc('MONTH'::text, now() - '1 mon'::interval)

ORDER BY 1, 2, 3;

evergreen-reports/monthlycircstatreports.1274292548.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.