title: SQL: Get count of distinct values of the table
body: <p>I am trying to get the count of distinct value of the table for example 
  I have below records in a table :</p>
  
  <pre><code>PK  Value
  1       A
  2       A
  3       A
  4       B
  5       C
  6       C
  7       D
  8       D
  9       D
  10      D
  11      E
  12      F
  </code></pre>
  
  <p>Looking above there are primary key<code>(PK)</code> and values, I want result like below :</p>
  
  <pre><code>Value   Count
  A        3
  B        1
  C        2
  D        4
  E        1
  F        1
  </code></pre>
  
  <p>Which should do a count each of the values.</p>
  
  <p>I am trying the <code>count(value)</code> function but not getting the expected result, is there any other function can be used?</p>