title: SQL To get Distinct Name and Number from table
body: <p>Looking for sql to get distinct names and count of those names from a sql table:</p>
  
  <p>Structure:</p>
  
  <pre><code>id
  name
  other details
  </code></pre>
  
  <p>Do I use distinct to get each group and then count through those to get:</p>
  
  <pre><code>name1 count(name1)
  name2 count(name2)
  etc
  </code></pre>
  
  <p>Thanks
  Rob.</p>