delete from szpj_biz_水文观测数据 a
where (a.观测点_id, a.观测时间, a.取样位置) in
(select 观测点_id, 观测时间, 取样位置
from szpj_biz_水文观测数据
group by 观测点_id, 观测时间, 取样位置
having count(*) > 1)
and rowid not in (select min(rowid)
from szpj_biz_水文观测数据
group by 观测点_id, 观测时间, 取样位置
where (a.观测点_id, a.观测时间, a.取样位置) in
(select 观测点_id, 观测时间, 取样位置
from szpj_biz_水文观测数据
group by 观测点_id, 观测时间, 取样位置
having count(*) > 1)
and rowid not in (select min(rowid)
from szpj_biz_水文观测数据
group by 观测点_id, 观测时间, 取样位置