do it like in the example below. You can probably abbreviate or omit some of the "rows between" clauses but, i have put the conditions explicitly so you can see what it is trying to docreate table #A(recordid int, Start_Date datetime, Interval_In_Minutes int);insert into #A values (1,'2014-10-30 00:00:00', 20), (1,'2014-10-30 00:00:00', 20), (1,'2014-10-30 00:00:00', 20), (1,'2014-10-30 00:00:00', 20);select recordid, dateadd ( mi, COALESCE(sum(Interval_In_Minutes) over (partition by Start_Date order by recordid rows between unbounded preceding and 1 preceding),0), Start_Date ) as Start_Date , dateadd ( mi, COALESCE(sum(Interval_In_Minutes) over (partition by Start_Date order by recordid rows between unbounded preceding and current row),0), Start_Date ) as Start_Date from #A;drop table #A