update ta a1 inner join (select type ty,max(age) mage from ta) a2 on a1.type = a2. ty and a1.age ...
stackoverflow.com