with t
as
(select 1 a ,10 b,11 c from dual
union all
select 2,10,11 from dual
union all
select 3,10,12 from dual
union all
select 4,10,13 from dual
union all
select 5,10,14 from dual
union all
select 6,10,14 from dual
union all
select 7,10,15 from dual
union all
select 8,10,16 from dual
)
select min(a),b,c from t group by c,b order by b
1 1 10 11
2 3 10 12
3 4 10 13
4 5 10 14
5 7 10 15
6 8 10 16
select * from xiaolin2
select min(liao2),quy,liao4 from xiaolin2 group by quy,liao4 order by quy
delete from xiaolin2
where liao2 not in ( with t as (select min(liao2) as liao3,quy,liao4 from xiaolin2 group by quy,liao4 order by quy) select liao3 from t)

删除重复quy,liao4 行并保留liao2较小的一行
更新后: