Advertisement
roganhamby

Rental Collection Report / Circ By Shelving Location

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