You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ClinicalTrialsDataProcessing/data_mgmt_scripts/drugtools/selected_trials.sql

22 lines
470 B
SQL

DELETE FROM http.download_status;
INSERT INTO http.download_status (nct_id, status)
SELECT nct_id, 'Of Interest'::http.history_download_status AS status
FROM ctgov.studies
WHERE
is_fda_regulated_drug=TRUE
AND
study_type = 'Interventional'
AND
phase='Phase 3'
AND
overall_status in ('Terminated', 'Completed')
AND
start_date > '2010-01-01'
AND
completion_date < '2022-01-01'
;
SELECT count(*) FROM http.download_status ;