title: SQL to count the total number for distinct values in a column
body: <p>I am looking for a query which will return the number of rows for each distinct value in a column.</p>
  <p>Consider the following table -</p>
  <p><a href="https://i.stack.imgur.com/eWSr9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eWSr9.png" alt="enter image description here" /></a></p>
  <p>I want to query for total number of rows for all distinct DoBs. I expect the following output-</p>
  <p><a href="https://i.stack.imgur.com/IDb4E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IDb4E.png" alt="enter image description here" /></a></p>
  <p><code>SELECT COUNT(DISTINCT DoB::date) AS Person_Count FROM TableName</code></p>