MySQL分组排序(取第一或最后) 方法一:速度非常慢,跑了30分钟 SELECT custid, apply_date, rejectrule FROM ( SELECT *, IF ( , ) AS rank, @pkey := custid FROM ( SELECT custid, createTime, SUBSTR( createTime, , ) AS apply_date, rejectRule, STATUS FROM ( SELECT * FROM credit.`apply…