title: ORACLE SQL Count or having count
body: <p>Trying to retrieve number of artists with more than 1 copy, I'm trying using following SQL it returning an error.</p>
  
  <blockquote>
    <p>ORA-00937: not a single-group group function 00937. 00000 - "not a
    single-group group function" *Cause: *Action: Error at Line: 22
    Column: 8</p>
  </blockquote>
  
  <pre><code>SELECT W.WORKID,A.LASTNAME,A.FISRTNAME, COUNT(W.ARTISTID) AS Orders
  FROM ( WORK W INNER JOIN ARTIST A
  ON W.ARTISTID=A.ARTISTID)
  GROUP BY A.LASTNAME, W.WORKID, A.FISRTNAME
  HAVING COUNT (W.ARTISTID) &gt; 1;
  
  SELECT WORKID,LASTNAME,FIRSTNAME
  FROM WORK W, ARTIST A
  WHERE W.ARTISTID = A.ARTISTID
  HAVING COUNT (W.ARTISTID) &gt; 1;
  </code></pre>