 SELECT Community2Item.community_id, ItemsByTitle.* 
 FROM ItemsByTitle, Community2Item
 WHERE ItemsByTitle.item_id = Community2Item.item_id
-ORDER BY Title, ItemsByTitle.item_id
-;
-
--------------------------------------------------------
---  ItemsByDate view
--------------------------------------------------------
-DROP VIEW ItemsByDate;
-
-CREATE VIEW ItemsByDate as
-SELECT DCResult.item_id, DCResult.text_value as DateIssued
-FROM DCResult, DCTypeRegistry
-WHERE DCTypeRegistry.element   = 'date' 
-AND   DCTypeRegistry.qualifier = 'issued'
-AND   DCTypeRegistry.dc_type_id = DCResult.dc_type_id
-AND   DCResult.in_archive = 't'
-ORDER BY DateIssued desc, DCResult.item_id
-;
+;
+
+-------------------------------------------------------
+--  ItemsByDate table
+-------------------------------------------------------
+DROP TABLE ItemsByDate;
+
+CREATE TABLE ItemsByDate
+(
+   items_by_date_id   INTEGER PRIMARY KEY,
+   item_id            INTEGER REFERENCES Item(item_id),
+   date_issued        TEXT
+);
 
 -------------------------------------------------------
 --  CollectionItemsByDate view

);

-- An index for dctypes
CREATE INDEX dcvalue_dc_type_id_idx  on DCValue(dc_type_id);

-------------------------------------------------------

SELECT Community2Item.community_id, ItemsByDate.* 
FROM ItemsByDate, Community2Item
WHERE ItemsByDate.item_id = Community2Item.item_id
;

-------------------------------------------------------
--  ItemsByDateAccessioned table
-------------------------------------------------------
DROP TABLE ItemsByDateAccessioned;

CREATE TABLE ItemsByDateAccessioned
(
   items_by_date_accessioned_id  INTEGER PRIMARY KEY,
   item_id                       INTEGER REFERENCES Item(item_id),
   date_accessioned              TEXT
);

-------------------------------------------------------
--  CollectionItemsByDateAccessioned view
