recordSeq 为自增主键,missionID为可能重复键

DELETE
FROM
t_cmp_record
WHERE
recordSeq NOT IN (
SELECT
t_temp.minSeq
FROM
(
SELECT
MIN(recordSeq) AS minSeq
FROM
t_cmp_record
GROUP BY
missionID
) t_temp
)