Just another way is to handle this at query-level using the command SQL object ( Add Command feature).
for e.g in Oracle:
select * from (select * from table_name1 group by column_name desc) table_name2
where rownum < = 10
order by rownum desc
-Prathamesh