Write a SQL query to find the top 5 departments by enrollment growth year-over-year at The Ohio State University, utilizing window functions.
Compare each department's latest available academic year with its immediately preceding year. Rank departments by absolute enrollment increase, using percentage growth and department name as deterministic tie-breakers.
department_name, academic_year, current_enrollment, prior_enrollment, enrollment_growth, growth_percentage.enrollment_growth descending, growth_percentage descending, then department_name ascending.growth_percentage to two decimal places.current_enrollment or prior_enrollment is NULL.prior_enrollment as producing a NULL growth_percentage rather than a calculable percentage.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Official department name |
| college_name | VARCHAR(100) | Associated college or academic division |
| Column | Type | Description |
|---|---|---|
| department_id | INT | Department associated with the enrollment record |
| academic_year | INT | Academic year represented as its ending year |
| enrollment | INT | Total enrolled students for the department and academic year |