group by 获取最新的数据
SELECT
*
FROM
xxx AS t
WHERE
1 = 1
AND t.id IN (
select id FROM (
SELECT
MAX( t.id ) id
FROM
xxx AS t
WHERE
1 = 1
GROUP BY
t.id_number,
t.`class`
ORDER BY
t.id
LIMIT 0,
10 ) a
)
ORDER BY
t.id
LIMIT 0,
10