SQL Real-Time Interview Question and Answer
SQL Real-Time Interview Question and Answer
3. How do you fetch all employees whose salary is greater than the average
salary?
SELECT FROM employees WHERE salary> (SELECT AVG (salary) FROM employees);
9. How do you fetch the top 5 employees with the highest salaries?
FROM employees ORDER BY salary DESC LIMIT 5;