select my.* from myTable my ; inner join ; (select ctobin(right(max(dtos(date)+bintoc(ID)),4) as ID, MyGroupField ; from myTable group by myGroupField) MaxInfo on my.ID = MaxInfo.IDFrom http://forum.foxclub.ru/read.php?32,177183,177232#msg-177232 (in Russian)