Write a SQL query to find the second-highest energy consumption value from a log table grouped by region.
Use the energy_consumption_log table. Consider only non-null consumption values and return regions with at least two distinct values.
region, second_highest_consumptionregion in ascending order| Column | Type | Description |
|---|---|---|
| log_idPK | INT | Unique log record identifier |
| region | VARCHAR(100) | Geographic region associated with the reading |
| energy_consumption | NUMERIC(12,2) | Recorded energy consumption value |