Tuesday, 15 September 2026

SQL Interview Question: - Find all employees whose salary is greater than the average salary of all employees


Questiion:

Find all employees whose salary is greater than the average salary of all employees.



Required result:

emp_id, 
first_name, 
last_name, 
salary


Dataset



 select emp_id, first_name, last_name, salary from employees

 where salary > (
    select avg(salary)
                         from employees);


See Result Below:-

 



Thanks


 

Featured post

Pivot Tables

Pivot Tables are one of the most useful tool in excel, and most excel experts says that this tool is the magic tool for quickly prepar...