This query is used to count the races (race_concept_id) across all person records. The input to the query is a value (or a comma-separated list of values) of a race_concept_id. If the input is omitted, all possible values of race_concept_id are summarized.
Input:
<None>
Sample query run:
The following is a sample run of the query to run a search for number of persons grouped by race.
SELECT CONCEPT.CONCEPT_NAME,
COUNT(person.person_ID) AS Num_Persons_count
FROM person INNER JOIN vocabulary.CONCEPT ON person.RACE_CONCEPT_ID = CONCEPT.CONCEPT_ID GROUP BY CONCEPT.CONCEPT_NAME
Output:
Output field list:
Field |
Description |
Race_Concept_ID |
Race concept identifier as defined in CDM vocabulary |
Race_Name
|
Race name as defined in CDM vocabulary |
Num_Persons_count |
Number of patients in the dataset of specific race |
Sample output record:
Field |
Value |
Race_Concept_ID |
8516 |
Race_Name |
Black or African American |
Num_Persons_count | 1596667 |
|