title: mysql query with 2 object for same table
body: <pre><code> 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 &gt; p2.Id
  </code></pre>
  
  <p>This is a SQL question and solution.
  My question is: why we need p1 and p2 two objects? What concept here this query is using? Certainly it it not table join sub-query.
  I am unfamiliar of this query pattern. Want someone give me some pointers or links about this type of query. thanks</p>