I have this table with HistoryDate and User. I need to query Max(Historydate), User correspondind to Maxdate, Min(HistoryDate), User corresponding to MinDate for each ReviewID like this
ModifiedDate |ModifiedBy| CreatedDate | CreatedBy |ReviewId
2/16/17 12:58 | Susan | 2/7/17 15:39 | John | 1
2/15/17 13:25 | Sam | 2/9/17 20:27 | John | 2
I am able to query it using table variable but wondering any other way to get it.