Topic: Grouping. Than to replace First?
How by means of grouping for each value of column ID1 to select value from column ID2 which corresponds to minimum value from column DateA?
At Access for this purpose there is function FIRST.
SELECT ID1, FIRST (ID2), MIN (DateA) From Table1...
At a SQL Server of such function is not present
Instead of FIRST (ID2) to write MIN (ID2) does not approach, as value ID2 which corresponds to minimum date from DateA, not always the minimum.
ID1 ID2 DateA
1 10 1/1/2017
1 12 1/2/2017
2 20 1/4/2017
2 21 1/4/2017
2 8 1/10/2017