WSP project leaders need to identify active projects where resource usage is highest relative to allocated capacity. Write a PostgreSQL query that ranks projects by their aggregate resource utilization.
status = 'Active'.hours_used divided by total hours_allocated, multiplied by 100.RANK() to rank projects from highest to lowest utilization and return the top three ranks.| Column | Type | Description |
|---|---|---|
| project_idPK | INT | Unique project identifier |
| project_name | VARCHAR(150) | WSP project name |
| status | VARCHAR(20) | Project status |
| Column | Type | Description |
|---|---|---|
| assignment_idPK | INT | Unique assignment identifier |
| project_id | INT | References projects.project_id |
| resource_name | VARCHAR(100) | Assigned WSP resource |
| hours_allocated | DECIMAL(10,2) | Hours allocated to the resource |
| hours_used | DECIMAL(10,2) | Hours used by the resource |