Problem
HR wants to know where each employee falls in the salary distribution. Using the employees table, return name, salary, and percentile (the PERCENT_RANK scaled to 0–100, rounded to 2 decimal places), ordered by salary ascending.
Schema
employees
| column | type |
|---|
| id | INTEGER |
| name | TEXT |
| department | TEXT |
| salary | INTEGER |
Sample Data
| id | name | department | salary |
|---|
| 1 | Alice | Engineering | 60000 |
| 2 | Bob | Marketing | 80000 |
| 3 | Carol | Engineering | 100000 |
| 4 | Dave | HR | 120000 |
| 5 | Eve | Engineering | 140000 |
Expected Output
| name | salary | percentile |
|---|
| Alice | 60000 | 0.00 |
| Bob | 80000 | 25.00 |
| Carol | 100000 | 50.00 |
| Dave | 120000 | 75.00 |
| Eve | 140000 | 100.00 |