Current salary by employee
mediumReturn employee names and current salaries. A NULL to_date marks the current salary. Sort by employee id.
Hospital Database · SQLite
Run your SQL answer to see the returned rows and check it.
SELECT e.first_name, e.last_name, s.salary FROM employees AS e JOIN salaries AS s ON s.employee_id = e.employee_id WHERE s.to_date IS NULL ORDER BY e.employee_id;