average salary by department sql code example
Example 1: average salary in sql
SELECT FIRST_NAME FROM EMPLOYEES
WHERE SALARY = (SELECT AVG(SALARY) FROM EMPLOYEES);
Example 2: above average salary in sql
SELECT FIRST_NAME FROM EMPLOYEES
WHERE SALARY > (SELECT AVG(SALARY) FROM EMPLOYEES);