karatekid36 Posted November 30, 2011 Share Posted November 30, 2011 With the below query, it returns the MIN salary for each department, but what if you want to list the EMP_ID or EMP_NAME in this list as well? Meaning you want to see the EMP_ID in the department that has the MIN(salary). Won't that end up expanding the returns to more or less all rows? SELECT department, MIN(salary) as "Lowest salary" FROM employees GROUP BY department; Thanks! Quote Link to comment Share on other sites More sharing options...
fenway Posted November 30, 2011 Share Posted November 30, 2011 Then you need a self-join. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.