I am using c#/MS-SQL and have a table similar to this:
id type image
10 AAAA a1.jpg
11 AAAA a2.jpg
12 BBBB b1.jpg
13 BBBB b2.jpg
I need to select the distinct type, AAAA or BBBB and out of those I need to select one row where the id is lowest.
So for the above example I need to return rows 10 and 12 (the lowest id of each distinct category).
id is always unique.
Any thoughts on this? I need to return all columns.