Write a SQL query using window functions to identify the most active mentors on MentorPass based on monthly session hours. Use completed sessions with a non-null duration, and consider all available session months.
month, mentor_id, mentor_name, monthly_session_hours, and activity_rank.mentor_id ascending.| Column | Type | Description |
|---|---|---|
| mentor_idPK | INT | Unique mentor identifier |
| mentor_name | VARCHAR(100) | Mentor display name |
| Column | Type | Description |
|---|---|---|
| session_idPK | INT | Unique mentoring session identifier |
| mentor_id | INT | Mentor who conducted the session |
| started_at | TIMESTAMP | Session start timestamp |
| duration_hours | NUMERIC(6,2) | Session duration in hours |
| status | VARCHAR(20) | Session completion status |