select t.column1, t.column2, t.column3, t.date from table t with (nolock) where t.column2 like '%AAA%' and t.date = (select max(date) from table where column2 = t.column2) order by t.column2