title: Get frequency of a column in SQL Server
body: <p>I have a column with values like 1,1,2,1,... and I would want to get the frequency of 1 and 2, I did </p>
  
  <pre><code>SELECT count(column)
  FROM table
  WHERE column = 1;
  
  SELECT count(column)
  FROM table
  WHERE column = 2;
  </code></pre>
  
  <p>But, could I take the frequency with a more direct way?</p>