Last active
August 29, 2015 13:59
-
-
Save jsicot/10653840 to your computer and use it in GitHub Desktop.
NbreNoticesCcodes2013
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 | |
i.ccode AS ccode, | |
count(DISTINCT(b.biblionumber)) as total | |
FROM | |
(SELECT biblionumber,barcode,ccode,dateaccessioned,itemlost,wthdrawn,timestamp FROM items) i | |
LEFT JOIN biblio as b ON b.biblionumber=i.biblionumber | |
WHERE (YEAR(b.datecreated) = '2013') | |
AND i.barcode IS NOT NULL | |
GROUP BY i.ccode | |
ORDER BY total DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment