title: Select all duplicate rows based on one or two columns?
body: <p>I Have a table named <code>contacts</code> with fields</p>
  
  <pre><code>+-----+------------+-----------+
  | id  | first_name | last_name |
  +-----+------------+-----------+
  </code></pre>
  
  <p>I want to display all duplicates based on <code>first_name</code> and (/ or) <code>last_name</code>, e.g:</p>
  
  <pre><code>+----+------------+-----------+
  | id | first_name | last_name |
  +----+------------+-----------+
  |  1 | mukta      | chourishi |
  |  2 | mukta      | chourishi |
  |  3 | mukta      | john      |
  |  4 | carl       | thomas    |
  +----+------------+-----------+
  </code></pre>
  
  <p>If searched on just <code>first_name</code> it should return:  </p>
  
  <pre><code>+----+
  | id |
  +----+
  |  1 |
  |  2 |
  |  3 |
  +----+
  </code></pre>
  
  <p>But if searched on both <code>first_name</code> and <code>last_name</code> should return:</p>
  
  <pre><code>+----+
  | id |
  +----+
  |  1 |
  |  2 |
  +----+
  </code></pre>