Novo Nordisk clinical analytics needs to identify patients who received multiple distinct diagnoses during the same calendar month. Write a PostgreSQL query using a common table expression (CTE).
| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| patient_name | VARCHAR(100) | Patient name |
| Column | Type | Description |
|---|---|---|
| diagnosis_idPK | INT | Unique diagnosis record identifier |
| patient_id | INT | Referenced patient identifier |
| diagnosed_at | DATE | Date on which the diagnosis was recorded |
| diagnosis_code | VARCHAR(50) | Diagnosis code or clinical diagnosis description |