Created
May 3, 2016 21:32
-
-
Save sandbergja/466eabb7a0181a534d2f8ac13269845c to your computer and use it in GitHub Desktop.
Count of items that LBCC patrons can request via resource sharing
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(c.id) FROM asset.copy c | |
WHERE | |
c.circ_modifier NOT IN (SELECT DISTINCT h.circ_modifier FROM config.hold_matrix_matchpoint h WHERE h.circ_modifier IS NOT NULL AND (h.user_home_ou=8 OR h.user_home_ou=1) AND h.active AND NOT h.holdable) | |
AND NOT c.deleted | |
AND c.circ_lib !=7 | |
AND c.circ_lib !=6 -- LPL | |
AND c.status != 2 -- Bindery | |
AND c.status != 3 -- Lost | |
AND c.status != 4 -- Missing | |
AND c.status != 10 -- ILL | |
AND c.status != 16 -- Long overdue | |
AND c.status != 103 -- Stolen | |
AND c.status != 17 -- Lost and paid | |
AND c.holdable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment