inst/QueryLibrary/Aggregate/person/PE10.md

PE10: Number of patients by day of the year

Description

This query is used to count the day of birth across all person records. All possible combinations for month and day of birth are summarized. Not all databases maintain day of birth. This query is only available from CDM V4 and above.

Query

SELECT
  month_of_birth,
  day_of_birth,
  count(*)::integer AS num_persons
FROM @cdm.person
GROUP BY month_of_birth, day_of_birth
ORDER BY month_of_birth, day_of_birth
;

Input

None

Output

| Field | Description | | --- | --- | | month_of_birth | Month of the year | | day_of_birth | Day of the month | | num_persons | Number of records |

Example output record

| Field | Value | | --- | --- | | month_of_birth | 5 | | day_of_birth | 23 | | num_persons | 2921 |

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.