Novo Nordisk's analytics team is consolidating patient records from Wegovy and Ozempic clinical programs. Write a PostgreSQL query that combines both patient tables and removes duplicate records.
patient_id, patient_name, birth_date, and indication from both tables.UNION so identical rows are returned only once. Do not treat records with the same patient_id but different attributes as duplicates.patient_id, then indication.| Column | Type | Description |
|---|---|---|
| patient_id | INTEGER | Patient identifier |
| patient_name | VARCHAR(100) | Patient name |
| birth_date | DATE | Patient date of birth |
| indication | VARCHAR(80) | Clinical indication |
| Column | Type | Description |
|---|---|---|
| patient_id | INTEGER | Patient identifier |
| patient_name | VARCHAR(100) | Patient name |
| birth_date | DATE | Patient date of birth |
| indication | VARCHAR(80) | Clinical indication |