This query is used to count the number of different distinct drugs (drug_concept_id) of all exposed persons. The input to the query is a value (or a comma-separated list of values) for a number of concepts. If the input is ommitted, all possible values are summarized.
|list of drug_type_concept_id
Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue
SELECT count(distinct t.drug_concept_id) AS drug_count, t.person_id
FROM drug_era t
group by t.person_id
having count(distinct t.drug_concept_id) in (3, 4)
Output field list:
||A foreign key that refers to a standard concept identifier in the vocabulary for the drug concept.
||A foreign key identifier to the person who is subjected to the drug. The demographic details of that person are stored in the person table.
Sample output record: