title: misuse of aggregate: COUNT()
body: <p>I have 2 tables rozmowa and abonent. I'm trying to do this: </p>
  
  <pre><code>dbGetQuery(con, "SELECT A.imie, A.nazwisko, A.numer, 
  COUNT(R.id_abonent_to) AS ile 
  FROM abonent A LEFT JOIN 
  rozmowa R ON A.id = R.id_abonent_to 
  WHERE ile &gt; 4
  GROUP BY A.id, A.imie, A.nazwisko, A.numer")
  </code></pre>
  
  <p>but I get an error </p>
  
  <blockquote>
    <p>misuse of aggregate: COUNT() </p>
  </blockquote>
  
  <p>Can someone explain to me why?</p>