Your question is Second Highest Value in SQL. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
IQVIA Clinical Trial Landscape analysts need to identify the second highest recorded C-reactive protein value among completed clinical trials. Write a PostgreSQL query that returns the second highest distinct CRP measurement after applying the required trial and metric filters.
clinical_trials to trial_measurements using trial_id.metric_name = 'CRP'.| Column | Type | Description |
|---|---|---|
| trial_idPK | INT | Unique clinical trial identifier |
| trial_name | VARCHAR(150) | Clinical trial name |
| phase | VARCHAR(20) | Clinical development phase |
| status | VARCHAR(30) | Current trial status |
| Column | Type | Description |
|---|---|---|
| measurement_idPK | INT | Unique measurement identifier |
| trial_id | INT | References clinical_trials.trial_id |
| metric_name | VARCHAR(50) | Name of the clinical metric |
| metric_value | NUMERIC(10,2) | Recorded numeric measurement |
| unit | VARCHAR(20) | Measurement unit |