我想从表中找到重复的行,除了id和created_at列之外,所有列都是相同的。 行的条件是
1. rows are consecutive i-e id always differ by 1
2. created at column can differ maximum by 10s.
有没有办法编写mysql查询来查找这些行?
答案 0 :(得分:0)
SELECT * FROM table a
WHERE id= (SELECT MAX(id)
FROM table b
WHERE a.created_at=b.created_at)