Select EMP with max SAL from each DEPT

前端 未结 4 1278
予麋鹿
予麋鹿 2021-01-25 22:38

I´m having a bad time with a SQL query. I´m using oracle default tables:

\'EMP\' TABLE

http://imageshack.us/photo/my-images/850/sinttuloxps.png/

AND

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-25 23:36

    As short as the question: SELECT DeptID, MAX(Salary) FROM Employees GROUP BY DeptID

提交回复
热议问题