Problem
Compensation planning requires bucketing employees into salary bands. Using the employees table, classify each employee as 'Junior' (salary < 70,000), 'Mid' (70,000–99,999), or 'Senior' (≥ 100,000). Return name, salary, and band, ordered by salary descending.
Schema
employees
| column | type |
|---|
| id | INTEGER |
| name | TEXT |
| department | TEXT |
| salary | INTEGER |
Sample Data
| id | name | department | salary |
|---|
| 1 | Alice | Engineering | 120000 |
| 2 | Bob | Marketing | 85000 |
| 3 | Carol | HR | 65000 |
| 4 | Dave | Engineering | 95000 |
| 5 | Eve | Marketing | 100000 |
Expected Output
| name | salary | band |
|---|
| Alice | 120000 | Senior |
| Eve | 100000 | Senior |
| Dave | 95000 | Mid |
| Bob | 85000 | Mid |
| Carol | 65000 | Junior |