title: count duplicate values in a column sql
body: <p>I want a query to count duplicate values in a column,is there any query for this or i was thinking as</p>
  
  <pre><code>total records=SELECT COUNT(column_name) FROM table_name;
  distinct records=SELECT COUNT(DISTINCT column_name) FROM table_name;
  duplicate count=total records-distinct records;
  </code></pre>