Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select ao.shortname, acn.label AS "Call Number", simple.title AS "Title", array_accum(DISTINCT(ac.barcode)) AS "Barcodes",
- count(acirc.id) AS "Number of Circs"
- from asset.copy ac
- join asset.copy_location acl ON ac.location = acl.id
- left join action.circulation acirc ON acirc.target_copy = ac.id
- join asset.call_number acn on acn.id = ac.call_number
- join reporter.materialized_simple_record simple ON acn.record = simple.id
- join actor.org_unit ao on ao.id = acirc.circ_lib
- where acl.name like 'Rental%' and ao.parent_ou = 119
- and date(acirc.xact_start) >= '2013-2-1' and date(acirc.xact_start) <= '2013-2-28'
- group by 1, 2, 3
- order by 1
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement