--- /dev/null
+BEGIN;
+
+CREATE OR REPLACE VIEW reporter.classic_current_circ AS
+SELECT cl.shortname AS circ_lib,
+ cl.id AS circ_lib_id,
+ circ.xact_start AS xact_start,
+ circ_type.type AS circ_type,
+ cp.id AS copy_id,
+ cp.circ_modifier,
+ ol.shortname AS owning_lib_name,
+ lm.value AS language,
+ lfm.value AS lit_form,
+ ifm.value AS item_form,
+ itm.value AS item_type,
+ sl.name AS shelving_location,
+ g.name AS profile_group,
+ dem.general_division AS demographic_general_division,
+ circ.id AS id,
+ cn.id AS call_number,
+ cn.label AS call_number_label,
+ call_number_dewey(cn.label) AS dewey,
+ hl.id AS patron_home_lib,
+ hl.shortname AS patron_home_lib_shortname,
+ paddr.county AS patron_county,
+ paddr.city AS patron_city,
+ paddr.post_code AS patron_zip,
+ sce1.value AS stat_cat_1,
+ sce2.value AS stat_cat_2
+ FROM action.circulation circ
+ JOIN reporter.circ_type circ_type ON (circ.id = circ_type.id)
+ JOIN asset.copy cp ON (cp.id = circ.target_copy)
+ JOIN asset.copy_location sl ON (cp.location = sl.id)
+ JOIN asset.call_number cn ON (cp.call_number = cn.id)
+ JOIN actor.org_unit ol ON (cn.owning_lib = ol.id)
+ JOIN metabib.rec_descriptor rd ON (rd.record = cn.record)
+ JOIN actor.org_unit cl ON (circ.circ_lib = cl.id)
+ JOIN actor.usr p ON (p.id = circ.usr)
+ JOIN actor.org_unit hl ON (p.home_ou = hl.id)
+ JOIN permission.grp_tree g ON (p.profile = g.id)
+ JOIN reporter.demographic dem ON (dem.id = p.id)
+ JOIN actor.usr_address paddr ON (paddr.id = p.billing_address)
+ LEFT JOIN config.language_map lm ON (rd.item_lang = lm.code)
+ LEFT JOIN config.lit_form_map lfm ON (rd.lit_form = lfm.code)
+ LEFT JOIN config.item_form_map ifm ON (rd.item_form = ifm.code)
+ LEFT JOIN config.item_type_map itm ON (rd.item_type = itm.code)
+ LEFT JOIN asset.stat_cat_entry_copy_map sc1 ON (sc1.owning_copy = cp.id AND sc1.stat_cat = 1)
+ LEFT JOIN asset.stat_cat_entry sce1 ON (sc1.stat_cat_entry = sce1.id)
+ LEFT JOIN asset.stat_cat_entry_copy_map sc2 ON (sc2.owning_copy = cp.id AND sc2.stat_cat = 2)
+ LEFT JOIN asset.stat_cat_entry sce2 ON (sc2.stat_cat_entry = sce2.id) ;
+
+COMMIT;
+