SQL Server : Adding RowId to Previous Result
Example:
Select row_number () over ( order by b.FieldName) , b.* from
(
select .....
)b
Real Code:
select row_number()over(order by b.DateResult) ,*
from(
SElect t.ECI,min(t.From_Date) as DateResult from @Table2 t group by ECI
)b