mysql 高效分組查詢取最大值

SELECT *  from (  SELECT MAX(ID) as id FROM t_n_repayment_detail GROUP BY PLAN_ID )t  INNER JOIN t_n_repayment_detail d on t.ID= d.id ;  
相關文章
相關標籤/搜索