From 68bd4fb6aae794b0c76f37ea4bfc625a5ca4ba6e Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 7 Mar 2008 21:37:28 +0000 Subject: [PATCH] circs by circ mod view git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@8907 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/fm_IDL.xml | 13 +++++++++++++ Open-ILS/src/sql/Pg/090.schema.action.sql | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 5941c756de..821e605b07 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1049,6 +1049,19 @@ + + + + + + + + + + + + + diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index 0e06d3b43a..7209067bde 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -108,6 +108,16 @@ CREATE INDEX circ_checkin_time ON "action".circulation (checkin_time) WHERE chec CREATE INDEX circ_circ_lib_idx ON "action".circulation (circ_lib); CREATE INDEX circ_open_date_idx ON "action".circulation (xact_start) WHERE xact_finish IS NULL; +CREATE OR REPLACE VIEW action.open_circ_count_by_circ_mod AS + SELECT circ.usr, + cp.circ_modifier, + count(circ.id) + FROM action.circulation circ + JOIN asset.copy cp ON (circ.target_copy = cp.id) + WHERE circ.checkin_time IS NULL + AND ( circ.stop_fines IN ('LOST','LONGOVERDUE','CLAIMSRETURNED') OR circ.stop_fines IS NULL ) + GROUP BY 1; + CREATE OR REPLACE VIEW action.open_circulation AS SELECT * -- 2.11.0