Advertisement
chrissharp123

Untitled

Jan 25th, 2024
1,197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT "circ".due_date AS "due_date",
  2.        "circ".circ_lib AS "circ_circ_lib",
  3.        "acn".label AS "call_number_label",
  4.        "acn".id AS "call_number",
  5.        "acn".owning_lib AS "call_number_owning_lib",
  6.        "ccs".id AS "status_code",
  7.        oils_i18n_xlate('config.copy_status', 'ccs', 'name', 'id', "ccs".id::TEXT, 'en-US') AS "copy_status",
  8.        "ccs".holdable AS "status_holdable",
  9.        "ccs".is_available AS "is_available",
  10.        oils_i18n_xlate('asset.copy_location', 'acpl', 'name', 'id', "acpl".id::TEXT, 'en-US') AS "copy_location",
  11.        "acpl".holdable AS "location_holdable",
  12.        "acpl".url AS "location_url",
  13.        "acp".id AS "id",
  14.        "acp".barcode AS "barcode",
  15.        "acp".circ_lib AS "circ_lib",
  16.        "acp".create_date AS "create_date",
  17.        "acp".active_date AS "active_date",
  18.        "acp".age_protect AS "age_protect",
  19.        "acp".holdable AS "holdable",
  20.        "acp".copy_number AS "copy_number",
  21.        "acp".circ_modifier AS "circ_modifier",
  22.        "acns".label AS "call_number_suffix_label",
  23.        "acns".id AS "call_number_suffix",
  24.        "acnp".label AS "call_number_prefix_label",
  25.        "acnp".id AS "call_number_prefix",
  26.        "crahp".name AS "age_protect_label",
  27.        "bmp".label AS "part_label",
  28.        "erfcc".circ_count AS "circ_count"
  29. FROM asset.copy AS "acp"
  30. INNER JOIN asset.call_number AS "acn" ON ("acn".id = "acp".call_number
  31.                                           AND ("acn".deleted = 'f')
  32.                                           AND ("acn".record = 248))
  33. INNER JOIN asset.call_number_prefix AS "acnp" ON ("acnp".id = "acn".prefix)
  34. INNER JOIN asset.call_number_suffix AS "acns" ON ("acns".id = "acn".suffix)
  35. INNER JOIN actor.org_unit AS "aou" ON ("aou".id = "acp".circ_lib
  36.                                        AND "aou".id IN
  37.                                          (SELECT (actor.org_unit_descendants("aou".id, '0'))."id" AS "id"
  38.                                           FROM actor.org_unit AS "aou"
  39.                                           WHERE "aou".id = 1))
  40. LEFT JOIN action.circulation AS "circ" ON ("circ".target_copy = "acp".id
  41.                                            AND "circ".checkin_time IS NULL)
  42. INNER JOIN asset.copy_location AS "acpl" ON ("acpl".id = "acp".location
  43.                                              AND "acpl".deleted = 'f')
  44. INNER JOIN config.copy_status AS "ccs" ON ("ccs".id = "acp".status)
  45. LEFT JOIN asset.copy_part_map AS "acpm" ON ("acpm".target_copy = "acp".id)
  46. LEFT JOIN biblio.monograph_part AS "bmp" ON ("bmp".id = "acpm".part
  47.                                              AND "bmp".deleted = 'f')
  48. LEFT JOIN config.rule_age_hold_protect AS "crahp" ON ("crahp".id = "acp".age_protect)
  49. INNER JOIN extend_reporter.full_circ_count AS "erfcc" ON ("erfcc".id = "acp".id)
  50. WHERE ("acp".deleted = 'f')
  51. ORDER BY evergreen.rank_ou("aou".id, '1', NULL),
  52.          "aou".shortname,
  53.          "acn".label_sortkey,
  54.          "acns".label_sortkey,
  55.          "bmp".label_sortkey,
  56.          "acp".copy_number,
  57.          "acp".barcode,
  58.          evergreen.rank_cp("acp".id)
  59. LIMIT 100
  60. OFFSET 0;
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement