Answers for "3 max salary in sql"

SQL
1

how to find max and min salary in sql

SELECT MAX(salary), MIN(salary) FROM employees;
Posted by: Guest on May-09-2021
0

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;
Posted by: Guest on January-28-2021
1

second max salary in sql

SELECT MAX(SALARY) 'SECOND_MAX' FROM EMPLOYEES
WHERE SALARY <> (SELECT MAX(SALARY) FROM EMPLOYEES);
Posted by: Guest on November-27-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language