Problem
A company intranet's employee directory is typically organized by department so that colleagues can easily scan through their team and adjacent teams. When exporting the directory to a spreadsheet or PDF, HR sorts it alphabetically by department first, then by employee name within each department to make it easy to read. Using the employees table, return name, department, and salary ordered alphabetically by department, then by name within each department.
Schema
employees
| column | type |
|---|
| id | INTEGER |
| name | TEXT |
| department | TEXT |
| salary | INTEGER |
Sample Data
| id | name | department | salary |
|---|
| 1 | Carol | Engineering | 95000 |
| 2 | Alice | Engineering | 120000 |
| 3 | Dave | HR | 65000 |
| 4 | Bob | Marketing | 80000 |
| 5 | Eve | HR | 70000 |
Expected Output
| name | department | salary |
|---|
| Alice | Engineering | 120000 |
| Carol | Engineering | 95000 |
| Dave | HR | 65000 |
| Eve | HR | 70000 |
| Bob | Marketing | 80000 |