Write a SQL query using window functions to identify the top three most active providers based on monthly session volumes.
Use the providers and sessions tables. Count sessions for known providers by calendar month, and use provider_id as the deterministic tie-breaker.
session_month, provider_id, provider_name, session_volume, and monthly_rank| Column | Type | Description |
|---|---|---|
| provider_idPK | INT | Unique provider identifier |
| provider_name | VARCHAR(100) | Provider display name |
| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique session identifier |
| provider_id | INT | Provider associated with the session |
| session_started | TIMESTAMP | Timestamp when the session started |