title: SQL QUERY SELECT ...COUNT(...)>5
body: <p>I have the following tables:</p>
  
  <pre><code>USER(iduser, fname, lname);
  
  TRANSACTION(idtrans,iduser,iddoc,datetrans);
  </code></pre>
  
  <p>I have to list all the users that have more than 5 borrowed documents, so I did this:</p>
  
  <pre><code>SELECT u.fname, u.lname
  FROM USERS u, TRANSACTION t
  WHERE t.iduser=u.iduser HAVING count(t.iduser)&gt;5;
  </code></pre>
  
  <p>BUT I get this error </p>
  
  <blockquote>
    <p>not a single-group group function</p>
  </blockquote>
  
  <p>Is there any other method to write this query?</p>