====== Daily Circulation Statistical Reports ====== ===== Daily Circulation Stats by Shelving Location and Library ===== **Submission Notes:** This report was submitted on 5/14/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 AFTER the day you are interested in getting daily circulation totals. If you would like it to reflect today's activity, remove **- '1 day'::interval** If you would like it to reflect activity from two days ago, change the **1** to a **2** (and so on). Where you see ORG, replace with your org unit's short name. SELECT copy_location.name, count(circulation.id) AS count FROM action.circulation JOIN actor.org_unit ON circulation.circ_lib = org_unit.id JOIN asset.copy ON copy.id = circulation.target_copy JOIN asset.copy_location ON copy.location = copy_location.id WHERE org_unit.shortname = 'ORG'::text AND date_trunc('DAY'::text, circulation.create_time) = date_trunc('DAY'::text, now() - '1 day'::interval) GROUP BY copy_location.name UNION SELECT 'ZZZ Total' AS name, count(circulation.id) AS count FROM action.circulation JOIN actor.org_unit ON circulation.circ_lib = org_unit.id JOIN asset.copy ON copy.id = circulation.target_copy JOIN asset.copy_location ON copy.location = copy_location.id WHERE org_unit.shortname = 'ORG'::text AND date_trunc('DAY'::text, circulation.create_time) = date_trunc('DAY'::text, now() - '1 day'::interval) ORDER BY 1; Back to [[evergreen-reports:sql:circulation|Evergreen Circulation Reports]] page