• From what I understood from reading your requirement and looking at the image you uploaded....i have come up with the following....I think it should work for you:

    Select Employee, MIN(Effect_Date) As MinEffectDate, MIN(End_Date) From Table

    Where JobCode = (Select JobCode From Table Where Effect_Date = (Select MAX(Effect_Date) From Table))

    Group By Employee

    If this does not work for your requirement the please visit the link in my signature and post DDL and sample data as shown in the link.....it is very tedious to create a sample data set by looking at the image you uploaded and the people here would not have the time to do so.

    If you post the DDL and Sample data as shown in the link in my signature, then you might have a better chance of getting your problem solved.

    EDIT(07/11/2012): There is a slight edit in this code......I forgot to add Group By in the code....you'll have to group by Employee.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉