CONDITION ERA‎ > ‎

CE13: Distribution of condition occurrence count

This query is used to to provide summary statistics for condition occurrence counts (condition_occurrence_count) across all condition era records: the mean, the standard deviation, the minimum, the 25th percentile, the median, the 75th percentile, the maximum and the number of missing values. No input is required for this query.

Input:
<None>

Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue
SELECT condition_concept_id
     , min( condition_occurrence_count ) AS min
     , max( condition_occurrence_count ) AS max
     , round( avg( condition_occurrence_count ), 2 ) AS avg
     , round( stdDev( condition_occurrence_count ) ) AS stdDev
     , PERCENTILE_DISC(0.25) WITHIN GROUP( ORDER BY condition_occurrence_count ) 
                                     AS percentile_25
     , PERCENTILE_DISC(0.5)  WITHIN GROUP (ORDER BY condition_occurrence_count )
                                     AS median
     , PERCENTILE_DISC(0.75) WITHIN GROUP (ORDER BY condition_occurrence_count )
                                     AS percential_75
  FROM condition_era 
 WHERE condition_concept_id IN( 254761, 257011, 320128, 432867, 25297 )
 GROUP BY condition_concept_id;
Output:
Output field list:
 Field  Description
concept_name An unambiguous, meaningful and descriptive name for the concept
condition_concept_id A foreign key that refers to a standard condition concept identifier in the vocabulary.
condition_occurrence_count The number of individual condition occurrences used to construct the condition era.

Sample output record:
 Field  Description
concept_name  
condition_concept_id  
condition_occurrence_count  
Comments