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 ;
mysql 高效分组查询取最大值
最新推荐文章于 2022-08-10 22:19:32 发布
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 ;