Question : Max record for Employee

I want the last record for each employee but I need to include fields where the data changes.  For example each employee can have more than one category but I only want to show the one they had last (based on the table Id).  I have attached my code.  I also attached sample data of the results I get now but what I want is in yellow.  Your expertise would be greatly appreciated.
Code Snippet:
1:
2:
3:
4:
5:
SELECT   DISTINCT MAX(veEmploy.[EeFlxID])  AS [MaxID],
                  [veEmploy].[EeCategory],
                  [veEmploy].[EeSocNumber]
FROM     vEEmploy
GROUP BY [veEmploy].[EeSocNumber],[veEmploy].[EeCategory]

Answer : Max record for Employee

is that the original query ?

SELECT  b. [EeFlxID]     AS [MaxID],
        b. [EeCategory],
        b. [EeSocNumber]
FROM     vEEmploy b
WHERE    EeFlxID = (SELECT MAX(EeFlxID)
           FROM   vEEmploy a
           WHERE  a.[EeSocNumber] = b.[EeSocNumber])
Random Solutions  
 
programming4us programming4us