Clinical Trials & Research Analytics Path · Mission 19 of 25Expert

Drug vs placebo AE rate delta — paired per-arm comparison

Pivot via MAX(CASE WHEN ...) inside a CTE to flatten a vertical structure (one row per arm) into horizontal columns (drug_rate, placebo_rate). Practice the paired-comparison shape that drives every A/B test, treatment-vs-control, and benchmark-vs-actual report.

The Brief

You'll practice

MAX(CASE) pivotPaired-comparison shapeNULLIF guard