select * from (select * from table_name order by id desc) h where h.catagory_id in(value1,value2,value3) group by h.catagory
可以返回一个结果集,以catagory为标准进行分组,同时保证取到每组里面的最新记录
2022-11-08 11:54:05
select * from (select * from table_name order by id desc) h where h.catagory_id in(value1,value2,value3) group by h.catagory
可以返回一个结果集,以catagory为标准进行分组,同时保证取到每组里面的最新记录