HR wants to identify employees who wear multiple hats. Using the employee_roles and employees tables, return employee_id, name, and role_count for employees assigned to more than one distinct role, ordered by role_count descending then name ascending.
employees
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| department | TEXT |
employee_roles
| column | type |
|---|---|
| id | INTEGER |
| employee_id | INTEGER |
| role | TEXT |
employees
| id | name | department |
|---|---|---|
| 1 | Alice | Engineering |
| 2 | Bob | Engineering |
| 3 | Carol | Design |
employee_roles
| id | employee_id | role |
|---|---|---|
| 1 | 1 | Engineer |
| 2 | 1 | Lead |
| 3 | 2 | Engineer |
| 4 | 3 | Designer |
| 5 | 3 | Lead |
| 6 | 3 | Manager |
| employee_id | name | role_count |
|---|---|---|
| 3 | Carol | 3 |
| 1 | Alice | 2 |
Carol holds 3 distinct roles (Designer, Lead, Manager) and Alice holds 2 (Engineer, Lead). Bob has only 1 role and is excluded.