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)
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)
where
t.major = 'xxxx' and t.graduate_date = max(to_char(t.graduate_date,'yyyymmdd'))
group by resume_id;
不知道这样能不能满足楼主你的要求.
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
)