Group on a numeric severity scale. Practice GROUP BY on an INTEGER grade column, COUNT(*) per bucket, and the framing of CTCAE severity distribution — the headline metric on every safety review.
Pharmacovigilance review tomorrow. From fact_adverse_events, give me the count of events at each CTCAE severity grade — severity and ae_count, sorted by severity ascending so grade 1 (mild) lands at the top and grade 5 (death) at the bottom. The slide template wants exactly that shape; the safety committee reads down the column to spot any unexpected concentration at grade 3+. CTCAE v5 is the standard scale: 1 = mild, 2 = moderate, 3 = severe, 4 = life-threatening, 5 = death.
| Column | Type | Key |
|---|---|---|
| ae_id | INT | PK |
| enrollment_id | INT | FK → fact_enrollments |
| event_date | TEXT | |
| meddra_term | TEXT | |
| severity | INT | |
| serious_flag | INT | |
| related_to_intervention | TEXT | |
| outcome | TEXT |
Each hint you reveal reduces the XP you can earn. Try the query first.
Single-table aggregate. fact_adverse_events covers every recorded AE; no WHERE clause needed for this report.
Group on the integer severity column. Don't filter on serious_flag or related_to_intervention by accident — those are different dimensions.
Two output columns: the grade and a row count. Sort ascending so grade 1 (mild) lands at the top, grade 5 (death) at the bottom.