我尝试创建应该删除重复的表行的mysql事件。
这是我的查询
DELETE FROM locations
WHERE id NOT IN (SELECT id
FROM locations
GROUP BY acc_id,`date`)
我收到了这个错误:
Error Code: 1093
You can't specify target table 'locations' for update in FROM clause.
如何更改查询以使其正常工作?