inst/QueryLibrary/Aggregate/person/PE06.md

PE06: Number of patients grouped by year of birth

Description

Counts the year of birth (year_of_birth) across all person records. All existing values for year of birth are summarized.

Query

SELECT
  year_of_birth,
  COUNT(person_id)::integer AS num_persons
FROM @cdm.person
GROUP BY year_of_birth
ORDER BY year_of_birth
;

Input

None

Output

| Field | Description | | --- | --- | | year_of_birth | Year of birth of the patient | | num_persons | Number of patients in the dataset of specific year of birth |

Example output record

| Field | Value | | --- | --- | | year_of_birth | 1950 | | num_persons | 389019 |

Documentation

https://github.com/OHDSI/CommonDataModel/wiki/PERSON

Sensitive fields

num_persons



sib-swiss/dsQueryLibraryServer documentation built on Feb. 13, 2025, 8:07 p.m.