select *, ; recno() as r1 ; from Table ; into Cursor x1 select x1 index on bintoc(r1+1) tag r1 select *, ; recno() as r2 ; from Table ; into Cursor x2 select x2 index on bintoc(r2) tag r2 select x2.*, ; x2.DateTimeField - x1.DateTimeField as SecondTaken ; from x1, x2 ; where ( bintoc(r2) == bintoc(r1+1) ) ; and ( (x2.DateTimeField - x1.DateTimeField) > n )