「SULP」という名前のsqliteテーブルがあり、次のようになります。
name year month day hour min ro
"SULP","12","7","7","0","0","2.41196" *
"SULP","12","7","7","0","0","2.39269"
"SULP","12","7","7","0","1","2.41117" *
"SULP","12","7","7","0","1","2.39198"
"SULP","12","7","7","0","2","2.41004" *
"SULP","12","7","7","0","2","2.39117"
"SULP","12","7","7","0","3","2.40914" *
"SULP","12","7","7","0","3","2.39043"
* でマークされた行は削除しません
私が試してみました
delete from SULP
where exists (select * from 'SULP' as t2 WHERE t2.year=year
AND t2.month=month AND t2.day=day AND t2.hour=hour AND
t2.min=min and ro<>t2.ro order by rowid desc limit 1);
と
delete from 'SULP'
where exists (select * from 'SULP' as t2 WHERE t2.year=year
AND t2.month=month AND t2.day=day AND t2.hour=hour AND
t2.min=min AND rowid<t2.rowid);
しかし運がない:(