find below average salary in sql code example
Example 1: FIND AVERAGE SALARY EARNER IN SQL
SELECT FIRST_NAME FROM EMPLOYEES
WHERE SALARY = (SELECT AVG(SALARY) FROM EMPLOYEES);
Example 2: FIND ABOVE AVERAGE SALARY EARNER IN SQL
SELECT FIRST_NAME, LAST_NAME
FROM EMPLOYEES
WHERE SALARY > (SELECT AVG(SALARY) FROM EMPLOYEES);
Example 3: find below average salary in sql
SELECT first_name, salary FROM employees
WHERE salary <= (SELECT AVG(salary) FROM employees);