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.
Requirements
- Join
clinical_trials to trial_measurements using trial_id.
- Include only completed trials and measurements where
metric_name = 'CRP'.
- Exclude NULL measurements and return the second highest distinct value. Duplicate highest or second-highest measurements must not create additional ranks.
Output details
- Return the value in a column named
second_highest_value.
- Return every row having the second-highest distinct value, including duplicate
18.50 rows.
- Preserve the stored numeric precision and scale without rounding or conversion.