用from的方法找出每個欄位下的最新商品,為什麼要找出來的結果不正確
select goods_id,cat_id,goods_name from (select * from goods where 1 order by cat_id asc,goods_id desc )as tep group by cat_id;
分組-》排序-》取最新
分組-》排序-》取最新