remove useless select during schema installation
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 20 Jan 2009 19:59:13 +0000 (19:59 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 20 Jan 2009 19:59:13 +0000 (19:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11891 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/extend-reporter.sql

index e31501a..baad188 100644 (file)
@@ -55,27 +55,5 @@ CREATE OR REPLACE VIEW extend_reporter.global_bibs_by_holding_update AS
             GROUP BY b.id)x
     ORDER BY id, holding_update;
 
-  SELECT id, LAST(holding_update) AS holding_update, update_type
-    FROM (SELECT  b.id,
-                  LAST(cp.create_date) AS holding_update,
-                  'add' AS update_type
-            FROM  biblio.record_entry b
-                  JOIN asset.call_number cn ON (cn.record = b.id)
-                  JOIN asset.copy cp ON (cp.call_number = cn.id)
-            WHERE NOT cp.deleted
-                  AND b.id > 0
-            GROUP BY b.id
-              UNION
-          SELECT  b.id,
-                  LAST(cp.edit_date) AS holding_update,
-                  'delete' AS update_type
-            FROM  biblio.record_entry b
-                  JOIN asset.call_number cn ON (cn.record = b.id)
-                  JOIN asset.copy cp ON (cp.call_number = cn.id)
-            WHERE cp.deleted
-                  AND b.id > 0
-            GROUP BY b.id)x
-    GROUP BY id, update_type;
-
 COMMIT;