...'Rome', 90);
insert into #t values ('3/1/2017', 'Rome', 30);
insert into #t values ('4/1/2017', 'Rome', 1320);
with rws as (
select #t.*,
row_number() over (partition by destination order by Destination, flight_date) rn
from #t
), tots (rn, flight_date, dest, DateDiffMin...