select upper(CCODE+TOWN+STREET+str(STNUM,4)+STNUMEXT+UNIT) as Address, * ; from (m.tcTableName) fr ; where fr.date = (select max(date) ; from (m.tcTableName) se where ; se.CCODE==fr.ccode and ; se.TOWN==fr.Town and ; se.StNum==fr.StNum and ; se.StNumExt==fr.StNumExt and ; se.Unit==fr.Unit ; order by 1 into table (m.lcFile))Right? I solved it by using two queries instead, but may try this variation as well. It would be interesting to compare the speed too. (BTW, fr - it's short for first and se - short for second :))