So, you need, for each set consisting of a grouping of StatusCode by Name, the count of the number of elements in each set?
How about
:
Code:
SELECT Name, ID, COUNT(*) as Result
FROM yourtable
GROUP BY Name, StatusCode
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com