select a,b,c,d,e,f from(
select t.a,t.b,t.c,t.d,t.e,t.f,row_number() over(partition by a,b,c order by e desc) rn from table_name t
) where rn = 1
--当然 table_name需你自己连接成表
连接好,用dense_rank()over()来排序,取出分组中E最大的
或者用
max()keep()配合group by
如果连接不是很复杂,我更喜欢not exists(select 1 from ... where a=t.a and b=t.b and c=t.c and e>t.e)的写法