求一短小精罕,性能坡加的sql语句
employeeid serviceDate
1 2004-01-01
1 2008-01-01
1 2006-01-01
2 2004-02-01
2 2006-02-01
2 2007-02-01
需要这个结果
employeeid serviceDate
1 2008-01-01
2 2007-02-01
------解决方案--------------------select employeeid,max(serviceDate) as serviceDate
from tablename
group by employeeid