SELECT SourceId,RecordId,StartDate,EndDate
, DATEDIFF(mi,a.EndDate,b.StartDate) DiffMin
FROM table a
LEFT JOIN table b ON A.no = B.no+1
SELECT SourceId,RecordId,StartDate,EndDate
, DATEDIFF(mi,a.EndDate,b.StartDate) DiffMin
FROM table a
LEFT JOIN table b ON A.no = B.no+1