I'm a beginner in coding SQL....why this statements :
SELECT MAX(salary)
FROM employees
HAVING(SELECT COUNT(MAX(salary))
FROM employees
GROUP BY salary ) IN (1,2,3,4,5)
It showing : no rows selected
Also :
SELECT MAX(salary)
FROM employees
HAVING COUNT(MAX(salary)) IN (1,2,3,4,5)
Showing : ERROR at line 3:
ORA-00935: group function is nested too deeply
I wanna know how can i fix error n this 2 cases and why they was error ;also if any one know another way to get the highest 5 salaries



LinkBack URL
About LinkBacks
Reply With Quote