回複:SQL菜鳥請教初級+sql問題(類似上題,有些變動),在線等...

select min(begdate),enddate

from (

select begdate,
enddate
from sometable
where enddate = (
select max(enddate)
from sometable
)
)
group by
enddate

above will work for Oracle and DB2

請您先登陸,再發跟帖!