For some reason I'm having a difficult time coming up with a good query that does what I need to do. Basically, I have a sample table and data like the following:
EmpID EmpName DeptID Salary Age
------- ---------------- -------- --------- ------
100 James Doe 001 50,123 34
101 John Smith 002 63,590 42
etc..
I need to find just one employee for each department that is the youngest by age with the highest salary. If there are more than one with the same attributes I still just need one regardless which one employee that is.
What's a good query to pull this off? Thanks.
It's "my" world. You're just living in it.