Your question is Top N by Group Salary. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given two tables, list the top N people with the highest salary in a specific group/department (SQL or Pandas option).
Asked in the Technical Phone Screen stage. Choice between SQL or Pandas was allowed. Standard top-N aggregation across two tables.
Write a SQL query to return the top N people by salary for one specific Meta department, such as Instagram Reels.
employee_id as the tie-breaker.N rows.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| department_id | INT | References departments.department_id |
| salary | NUMERIC(12,2) | Annual salary in USD |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department or group name |