SQL · ByteDance · Medium
You are given two tables that track employees and their department salary assignments. employees stores each employee's identifier and name. employee_department stores salary assignments; an employee may appear in several departments, and the same (employee_id, department_id) pair may have multiple rows over time. For each (employee_id, department_id) pair, only the row with the greatest updated_at is considered current. If that pair has multiple rows with the same greatest…
Checking your access…