How to handle ties in SQL

SELECT employee_id, department_id, first_name, last_name, hire_date, job_id FROM employees e WHERE hire_date IN ( SELECT max(hire_date) FROM employees WHERE e.department_id = department_id ) ORDER BY hire_date ASC Result of the query So this is my query and the result of it. There are two tied results for SA_REP department and I should have only one… Read More How to handle ties in SQL