SELECT
*
FROM
(SELECT
MAX(id) AS id
FROM
icbc_erp_kj_icbc_result
WHERE STATUS = 61
GROUP BY
qryid) a
INNER JOIN icbc_erp_kj_icbc_result b on b.id =a.id
SELECT
*
FROM
(SELECT
MAX(id) AS id
FROM
icbc_erp_kj_icbc_result
WHERE STATUS = 61
GROUP BY
qryid) a
INNER JOIN icbc_erp_kj_icbc_result b on b.id =a.id