DELETE FROM user WHERE id IN (SELECT min(id) id FROM (SELECT
*
FROM
user
WHERE
`member_id` IN (
SELECT
member_id
FROM
(
SELECT
member_id,
count(1) cnt
FROM
user
GROUP BY
member_id
HAVING
cnt > 1
) c
) )a GROUP BY `member_id`) LIMIT 49;
标签:清理,主键,member,user,Id,id,SELECT
From: https://www.cnblogs.com/yourxiong/p/16882119.html