select * from (select * from table_name order by id desc) h where h.catagory_id in(value1,value2,value3) group by h.catagoryselect * from (select * from table_name order b
select * from (select * from table_name order by id desc) h where h.catagory_id in(value1,value2,value3) group by h.catagoryselect * from (select * from table_name order b