title: When should I use GROUP BY?
body: <p>According to  documentation:</p>
  
  <blockquote>
    <p>Aggregate functions often need an added GROUP BY statement.</p>
  </blockquote>
  
  <p>Well, I have a query which is containing an aggregate function:</p>
  
  <pre><code>select col1, count(col2)
  from table
  where col1 = 'anything'
  group by col1;
  </code></pre>
  
  <p>Now, my question is: <code>group by</code> in the above query is useful or useless? Because there is <code>where</code> clause, and I think it does not need to <code>group by</code> anymore. Am I wrong?</p>