Deleting duplicates from a large table

前端 未结 5 938
没有蜡笔的小新
没有蜡笔的小新 2021-01-02 02:40

I have quite a large table with 19 000 000 records, and I have problem with duplicate rows. There\'s a lot of similar questions even here in SO, but none of them seems to gi

5条回答
  •  孤城傲影
    2021-01-02 02:55

    SELECT *, COUNT(*) AS Count
    FROM table
    GROUP BY location_id, datetime
    HAVING Count > 2
    

提交回复
热议问题