ORACLE的SQL语句,求求平均薪水等级最低的部门的部门名称,哪里错了 30
selectdnamefromdeptdjoin(selectrownum,avg(grade),deptnofrom(selectdeptno,avg(grade)fr...
select dname from dept d join (select rownum,avg(grade),deptno from (select deptno,avg(grade) from (select deptno,grade from emp join salgrade on sal between losal and hisal) group by deptno order by avg(grade)) where rownum=1) t on d.deptno=t.deptno;
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询