1. select all the employee Ids that are managers in the sub-query 2. select all columns you need from employees and reference to the sub-query on empid Just a quick note to this question. I guess that this is homework, if I am wrong please let me know. As such, let me say, it would be better if you supply us with what code you have so far and we can give pointers on how to change/improve the code. This is also valid even if it is not homework - give us what you have so far, we aren't really here to provide a complete solution (rather help out where you are stuck). Back to the question - I don't think a subquery would even be necessary - although I don't have the table structure or example data (provide this in future for a little more detailed help from others).
Taking the question that you have asked you need to SELECT some data from a table WHERE certain values meet some criteria. My suggestion would be to start by just getting all the data from the table you are working with a then, once you can see all of that reduce the columns that you want to have and add a filter to remove rows where the record doesnt relate to a manager. As some reference I would recommend [
http://msdn.microsoft.com/en-US/library/ms189499(v=SQL.90).aspx] as your starting point. Just a quick note on the fact that this might be a college/homework question. We do not by any means disapprove or discourage students asking questions here. We will simply tailor our advice to help you understand what you are being asked to provide and how you might achieve that. Thanks for asking your question here. Let us know how you get on and if you have more question please come back to ask them. And dont be shy to let us know if you are a student :