annual salary in sql IS MAX SALARY? code example
Example 1: how to get max salary in each department in sql
SELECT firstname, MAX(salary)
FROM department d LEFT OUTER JOIN employee e
ON (d.department_id = e.department_id)
GROUP BY department_id;
Example 2: max 3 salary in sql
SELECT salary, first_name, last_name FROM employees
ORDER BY salary DESC LIMIT 3;