--
-- Type: VIEW; Owner: BIOMART; Name: CTD_TD_SPONSOR_VIEW
--
  CREATE OR REPLACE FORCE VIEW "BIOMART"."CTD_TD_SPONSOR_VIEW" ("ID", "REF_ARTICLE_PROTOCOL_ID", "SPONSOR", "TRIAL_NBR_OF_PATIENTS_STUDIED", "SOURCE_TYPE") AS 
  select rownum as ID, v."REF_ARTICLE_PROTOCOL_ID",v."SPONSOR",v."TRIAL_NBR_OF_PATIENTS_STUDIED",v."SOURCE_TYPE"
 from (
 select distinct REF_ARTICLE_PROTOCOL_ID,
     SPONSOR,
     TRIAL_NBR_OF_PATIENTS_STUDIED,
     SOURCE_TYPE
 from ctd_full
 where SPONSOR is not null or TRIAL_NBR_OF_PATIENTS_STUDIED  is not null
 order by REF_ARTICLE_PROTOCOL_ID, SPONSOR, TRIAL_NBR_OF_PATIENTS_STUDIED
 ) v





;
 
