<p>If I have data like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Key</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Dan</td>
</tr>
<tr>
<td>2</td>
<td>Tom</td>
</tr>
<tr>
<td>3</td>
<td>Jon</td>
</tr>
<tr>
<td>4</td>
<td>Tom</td>
</tr>
<tr>
<td>5</td>
<td>Sam</td>
</tr>
<tr>
<td>6</td>
<td>Dan</td>
</tr>
</tbody>
</table>
</div>
<p>What is the SQL query to bring back the records where <code>Name</code> is repeated 2 or more times?</p>
<p>So the result I would want is</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Tom</th>
</tr>
</thead>
<tbody>
<tr>
<td>Dan</td>
</tr>
</tbody>
</table>
</div>
[{'answer_id': 3197, 'author': 'GateKiller', 'author_id': 383, 'author_profile': 'https://Stackoverflow.com/users/383', 'pm_score': 6, 'selected': True, 'text': '<p>Couldn\'t be simpler...</p>\n\n<pre class="lang-sql prettyprint-override"><code>Select Name, Count(Name) As Count \n    From Table\n    Group By Name\n    Having Count(Name) &gt; 1\n    Order By Count(Name) Desc\n</code></pre>\n\n<p>This could also be extended to delete duplicates:</p>\n\n<pre class="lang-sql prettyprint-override"><code>Delete From Table\nWhere Key In (\n    Select Max(Key)\n        From Table\n        Group By Name\n        Having Count(Name) &gt; 1\n    )\n</code></pre>\n'}, {'answer_id': 6986, 'author': 'Dag Haavi Finstad', 'author_id': 687, 'author_profile': 'https://Stackoverflow.com/users/687', 'pm_score': 2, 'selected': False, 'text': '<p>This could also be accomplished by joining the table with itself,</p>\n\n<pre><code>SELECT DISTINCT t1.name\nFROM    tbl t1\n        INNER JOIN tbl t2\n        ON      t1.name = t2.name\nWHERE   t1.key         != t2.key;\n</code></pre>\n'}, {'answer_id': 13512, 'author': 'Ryan', 'author_id': 1545, 'author_profile': 'https://Stackoverflow.com/users/1545', 'pm_score': 2, 'selected': False, 'text': '<pre><code>select name from table group by name having count(name) &gt; 1\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/3196', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/230/']