I do not understand your data, but you may want to start with something like:-- *** Test Data ***CREATE TABLE #t( ID int NOT NULL ,ProductID varchar(20) NOT NULL ,Actual_Quantity int NOT NULL ,Cost money NOT NULL ,Posted_Quantity int NOT NULL ,DateChanged datetime NOT NULL);INSERT INTO #tVALUES (108788, 'MySKUHere', 19, 350.69, 14, '20140829 1:06 PM') - -added ,(435287, 'MySKUHere', 19, 350.69, 14, '20140903 6:15 PM') ,(506959, 'MySKUHere', 19, 350.69, 14, '20140903 7:51 PM') ,(564179, 'MySKUHere', 19, 350.69, 14, '20140904 6:47 AM') ,(657927, 'MySKUHere', 19, 350.69, 14, '20140904 3:30 PM') ,(755882, 'MySKUHere', 20, 350.69, 15, '20140905 4:39 PM') --Expired/updated ,(786945, 'MySKUHere', 20, 350.69, 15, '20140905 5:45 PM') ,(1158396, 'MySKUHere', 20, 350.69, 15, '20140908 11:06 AM') ,(1223164, 'MySKUHere', 19, 350.69, 14, '20140909 12:55 PM')-- ,(1270492, 'MySKUHere', 19, 350.69, 14, '20140910 1:01 AM') ,(1338233, 'MySKUHere', 19, 350.69, 14, '20140910 9:55 AM') ,(3337978, 'MySKUHere', 16, 350.69, 11, '20140920 3:45 AM')-- ,(3506143, 'MySKUHere', 16, 350.69, 11, '20140920 11:38 AM') ,(3517289, 'MySKUHere', 16, 350.69, 11, '20140920 12:45 PM') ,(9821408, 'MySKUHere', 16, 339.96, 11, '20141002 11:45 AM') ,(9846910, 'MySKUHere', 16, 339.96, 11, '20141002 12:45 PM') ,(9874745, 'MySKUHere', 16, 339.96, 11, '20141002 1:45 PM') ,(10022199, 'MySKUHere', 16, 339.96, 11, '20141002 6:45 PM') ,(10052747, 'MySKUHere', 16, 339.96, 11, '20141002 7:45 PM') ,(11310398, 'MySKUHere', 0, 339.96, 0, '20141005 12:19 PM');-- *** End Test Data ***WITH GrpsAS( SELECT MIN(ID) AS ID ,ProductID, Actual_Quantity, Cost, Posted_Quantity ,MIN(DateChanged) AS DateChanged ,ROW_NUMBER() OVER (ORDER BY MIN(DateChanged)) AS rn FROM #t GROUP BY ProductID, Actual_Quantity, Cost, Posted_Quantity)SELECT G1.ID, G1.ProductID, G1.Actual_Quantity, G1.Cost, G1.Posted_Quantity ,G1.DateChanged AS DateAdded ,G2.DateChanged AS DateUpdated ,G2.DateChanged AS DateExpiredFROM Grps G1 LEFT JOIN Grps G2 ON G1.rn = G2.rn -1ORDER BY ID;