GROUP BY clause to group the results by emp_id.MAX function to the salary column to find the highest salary for each emp_id.firstname, lastname, and department_id columns in the GROUP BY clause to ensure they are included in the final result.emp_id in ascending order.salary column in descending order.emp_id column, keeping the first occurrence.emp_id in ascending order.erDiagram
Salary {
int emp_id
varchar firstname
varchar lastname
int salary
varchar department_id
}