+ 1
Hi I can't do this command how can I do it? ? SELECT MAX( Avg(sal) ),deptno FROM emp Group by deptno;
,ORACLE DataBase
5 Answers
+ 1
Your sql statement looks fine, no syntax errors. Does the table exist in your database? What is the error you are getting?
+ 1
Assuming you are trying to get the max of all the average sal, this should work
SELECT MAX(avgsal)
FROM (SELECT AVG(sal) AS avgsal, deptno
FROM emp
GROUP BY deptno) AS avgEmp
0
Oh yes i forrget some thing in my Quastion
0
SELECT MAX(Avg(sal) ) ,deptno
FROM emp
Group by deptno;
0
All thinks, if you know another method it's good i need it