How would you use SQL window functions to rank schools by average student score within each district?
Use the provided district, school, and student score data. Include schools with recorded scores and valid district assignments. Tied average scores must receive the same rank.
district_name, school_name, average_score, and district_rank.| Column | Type | Description |
|---|---|---|
| district_idPK | INT | Unique district identifier |
| district_name | VARCHAR(100) | District name |
| Column | Type | Description |
|---|---|---|
| school_idPK | INT | Unique school identifier |
| school_name | VARCHAR(150) | School name |
| district_id | INT | Associated district identifier |
| Column | Type | Description |
|---|---|---|
| score_idPK | INT | Unique score record identifier |
| school_id | INT | School receiving the score |
| score | INT | Student score on the assessment |