Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id.
+----+------------------+
| Id | Email |
+----+------------------+
| 1 | john@example.com |
| 2 | bob@example.com |
| 3 | john@example.com |
+----+------------------+
Id is the primary key column for this table.
# Write your MySQL query statement below
DELETE p1
FROM Person p1, Person p2
WHERE p1.Email = p2.Email AND
p1.Id > p2.Id
这是一个SQL问题和解决方案。 我的问题是:为什么我们需要p1和p2两个对象?这个查询在这里使用什么概念?当然它不是表连接子查询。 我不熟悉这种查询模式。希望有人给我一些关于此类查询的指针或链接。感谢