Advertisement
chrissharp123

Untitled

Jul 17th, 2023
1,273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT  circ_lib."shortname" AS "Circ Library",
  2.         acl."name" AS "Shelving Location",
  3.         acn."label" AS "Call Number Label",
  4.         rmsr."author" AS "Author",
  5.         rmsr."title" AS "Title",
  6.         mfr."tag" AS "MARC Tag",
  7.         mfr."subfield" AS "MARC Subfield",
  8.         mfr."value" AS "MARC Value",
  9.         acp."barcode" AS "Barcode",
  10.         COUNT(circ."id") AS "Circ ID"
  11.   FROM  asset.copy AS acp
  12.         INNER JOIN asset.call_number AS acn ON (acp."call_number" = acn."id")
  13.         INNER JOIN biblio.record_entry AS bre ON (acn."record" = bre."id")
  14.         LEFT OUTER JOIN reporter.materialized_simple_record AS rmsr ON (bre."id" = rmsr."id")
  15.         LEFT OUTER JOIN metabib.full_rec AS mfr ON (bre."id" = mfr."record")
  16.         INNER JOIN asset.copy_location AS acl ON (acp."location" = acl."id")
  17.         INNER JOIN actor.org_unit AS circ_lib ON (acp."circ_lib" = circ_lib."id")
  18.         LEFT OUTER JOIN action.circulation AS circ ON (acp."id" = circ."target_copy")
  19.   WHERE ((mfr."tag") IS NULL OR mfr."tag" IN ('655'))
  20.         AND acp."deleted" = 'f'
  21.         AND ((mfr."subfield") IS NULL OR mfr."subfield" IN ('a'))
  22.         AND ((mfr."value") IS NULL OR mfr."value" IN ('young adult fiction'))
  23.         AND bre."id" > '0'
  24.         AND circ_lib."id" IN ('18')
  25.   GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9
  26.   ORDER BY circ_lib."shortname" ASC, acl."name" ASC, acn."label" ASC, rmsr."author" ASC, rmsr."title" ASC, mfr."tag" ASC, mfr."subfield" ASC, mfr."value" ASC, acp."barcode" ASC, COUNT(circ."id") ASC
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement