I need to get a set of distinct records for a table along with the max date across all the duplciates.
ex:
Select distinct a,b,c, Max(OrderDate) as maxDate
From ABC
Group By a,b,c
The issue is I get a record back for each different date.
Ex:
aaa, bbb, ccc, Jan 1 2009
aaa, bbb, ccc, Jan 28 2009
How can I limit this so I end up with only:
aaa, bbb, ccc Jan 28 2009
I assume the issue is the gorup by and distinct not getting along well.
EDIT: Found the issue that was causing the problem, query results were as expected, not as above.