最佳答案
SELECT *
FROM thetable t -- How to find animals
WHERE EXISTS ( -- where (different animals) exist
SELECT * FROM thetable x
WHERE x.alt_anim_ident = t.alt_anim_ident -- that have same ident
AND x.animals_key <> t.animals_key -- but different key
)
ORDER BY t.alt_anim_ident, t.animals_key
;
关于sql - 识别表中的重复数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37269325/