Last active
April 28, 2016 22:12
-
-
Save sandbergja/e2517cca3bb36caca1803c96e51eaa95 to your computer and use it in GitHub Desktop.
ACRL circ stats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT COUNT(circ.id) AS renewal | |
FROM action.circulation circ, asset.copy c, asset.call_number cn, metabib.rec_descriptor mb | |
WHERE xact_start > '2014-07-01' AND xact_start< '2015-07-01' | |
AND circ.circ_lib=7 | |
AND (opac_renewal OR phone_renewal OR desk_renewal) | |
AND copy_location != 229 AND copy_location != 238 | |
AND circ.target_copy=c.id AND c.call_number=cn.id AND mb.record=cn.record | |
AND mb.item_type != 'r'; | |
SELECT COUNT(circ.id) AS circ | |
FROM action.circulation circ, asset.copy c, asset.call_number cn, metabib.rec_descriptor mb | |
WHERE xact_start > '2014-07-01' AND xact_start< '2015-07-01' | |
AND circ.circ_lib=7 | |
AND NOT opac_renewal AND NOT phone_renewal AND NOT desk_renewal | |
AND copy_location != 229 AND copy_location != 238 | |
AND circ.target_copy=c.id AND c.call_number=cn.id AND mb.record=cn.record | |
AND mb.item_type != 'r'; | |
SELECT COUNT(id) AS reserves | |
FROM action.circulation | |
WHERE xact_start > '2014-07-01' AND xact_start< '2015-07-01' | |
AND circ_lib=7 | |
AND copy_location = 229; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment