Write a SQL query to return the second-highest value in each region using window functions.
Use the regional_values table. Return only regions with at least two distinct non-null values. If multiple records share the second-highest value, return that value once.
region and second_highest_value.region in ascending order.| Column | Type | Description |
|---|---|---|
| value_idPK | INT | Unique identifier for the regional value record |
| region | VARCHAR(50) | Region associated with the value |
| metric_value | DECIMAL(12,2) | Numeric value to rank within each region |