Ad-hoc Query: Count of trials with NCI Grant Information -------------------------------------------------------- Old Version =========== select count(distinct q.doc_id) FROM query_Term q, docs_with_pub_status d WHERE q.doc_id=d.doc_id AND q.path = '/InScopeProtocol/FundingInfo/NIHGrantContract/GrantContractNo' AND q.value like '%CA%' AND d.pv='Y' New Version =========== SELECT COUNT(DISTINCT q.doc_id) FROM query_Term q JOIN docs_with_pub_status d ON q.doc_id = d.doc_id AND d.pv = 'Y' WHERE (q.path = '/InScopeProtocol/FundingInfo' + '/NIHGrantContract/GrantContractNo' OR q.path = '/CTGovProtocol/PDQAdminInfo' + '/FundingInfo/NIHGrantContract' + '/GrantContractNo' ) AND q.value LIKE '%CA%'