Write a SQL query using window functions to find the second-highest mortgage application volume by region.
Use the regions and mortgage_applications tables. Include regions with no applications when calculating volumes, and return every region tied at the second-highest volume.
region_name and application_volume.region_name.| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique identifier for a geographic region |
| region_name | VARCHAR(100) | Name of the geographic region |
| Column | Type | Description |
|---|---|---|
| application_idPK | INT | Unique identifier for a mortgage application |
| region_id | INT | Region associated with the application |
| application_date | DATE | Date the mortgage application was submitted |
| application_status | VARCHAR(30) | Current processing status of the application |