笨办法:
close all
set delete off
select * from ttt where upper(a3)='T' into cursor ttt1
select ttt
recall all
select ttt1
scan
select ttt
delete all for id=ttt1.id and a2=ttt1.a2 and a3=ttt1.a3 and a4=ttt1.a4
calc min(abs(id-ttt1.id)) to xx for not delete() and a2=ttt1.a2
delete all for abs(id-ttt1.id)=xx and a2=ttt1.a2
select ttt1
endscan
select * from ttt where deleted() order by a2,id