declare @field1 intdeclare @field2 intselect @field1=field1,@field2=max(field2) from table where field1=(select max(field1) from table) group by field1