     WHERE h.cnt >= 3 AND 
 			t.pftype_id IN (5,6) AND
       r.pmodel_id = 11368857 AND r."start" > t.stop;
-
- 
 
 -- build a set of pclusters based on known SPDI ITIM seqs
 DELETE FROM cavs.pclusterset WHERE pclustersetname_id=1;

-- NAME: itim_mining.sql
-- PURPOSE: sql code for mining Unison for ITIMS
-- 
-- $Id: itim_mining.sql,v 1.3 2004/05/12 23:11:40 cavs Exp $
-- -----------------------------------------------------------------------------

CREATE OR REPLACE VIEW cavs.canonical_itim AS

    t.pftype_id IN (5,6) AND t.start > h.stop AND
    r.pmodel_id=11368857 AND r.start > t.stop;

DROP VIEW prospect_ig_fn3_in_top_10;
CREATE OR REPLACE VIEW prospect_ig_fn3_in_top_10 AS
	SELECT Q.pseq_id,(SELECT count(DISTINCT pmodel_id) FROM 
	((SELECT pmodel_id FROM paprospect2 A WHERE A.pseq_id=Q.pseq_id AND A.params_id=1 
	ORDER BY raw LIMIT 10)   INTERSECT   
	(SELECT pmodel_id FROM pmsm_prospect2 WHERE pmodelset_id IN (13,14))) X) AS cnt FROM pseq Q;

CREATE OR REPLACE VIEW cavs.prospect_tm_itim AS
  SELECT DISTINCT r.pseq_id, 
