select
    e.*
from
    EDUCATION e
where
    e.MAJOR='xxxx'
    and
    not exists(select 
                   * 
               from 
                   EDUCATION 
               where 
                   RESUME_ID=w.RESUME_ID 
                   and 
                   MAJOR=e.MAJOR 
                   and 
                   GRADUATE_DATE>e.GRADUATE_DATE)

解决方案 »

  1.   

    select t.resume_id
    where 
    t.major = 'xxxx' and t.graduate_date =  max(to_char(t.graduate_date,'yyyymmdd'))
    group by resume_id;
    不知道这样能不能满足楼主你的要求.
      

  2.   

    select
        e.*
    from
        EDUCATION e
    where
        e.MAJOR='xxxx'
        and
        e.GRADUATE_DATE=(select 
                       max(GRADUATE_DATE) 
                   from 
                       EDUCATION 
                   where 
                       RESUME_ID=w.RESUME_ID 
                       and 
                       MAJOR=e.MAJOR 
        )