Tempus AI is evaluating a new drug using a clinical outcomes cohort. Write a PostgreSQL query to estimate the unadjusted average treatment effect by comparing the mean post-treatment outcome for patients receiving the new drug with the mean outcome for control patients.
| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| patient_name | VARCHAR(100) | Patient name |
| cancer_type | VARCHAR(50) | Cancer classification |
| Column | Type | Description |
|---|---|---|
| assignment_idPK | INT | Unique treatment assignment identifier |
| patient_id | INT | Assigned patient |
| treatment_group | VARCHAR(20) | Treatment group, either new_drug or control |
| Column | Type | Description |
|---|---|---|
| outcome_idPK | INT | Unique outcome identifier |
| patient_id | INT | Patient associated with the outcome |
| outcome_type | VARCHAR(50) | Clinical outcome measure |
| outcome_score | DECIMAL(8,2) | Post-treatment outcome score |