A B C D E F 中有函数么?

解决方案 »

  1.   

    连接好,用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)的写法
      

  2.   

    说详细点,表与表之间是是怎么关联的?A,B,C,D,E分别对应的是哪个表?
      

  3.   


    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需你自己连接成表