title: Cannot use Max with Count in SQL*Plus
body: <p>this is my sql statement i get this error. but when i use only Max to single and without displaying other results it works. can someone help me</p>
  
  <pre><code>SELECT cat.CategoryName,sb.SubCategoryName,MAX((COUNT(bs.BookID))) 
  FROM
    Category cat,SubCategory sb, Book_Subcategory bs 
  WHERE cat.CategoryID = sb.CategoryID AND sb.SubCategoryID = bs.SubCategoryID 
  GROUP BY cat.CategoryName, sb.SubCategoryName, bs.BookID;
  </code></pre>
  
  <p><code>ERROR at line 1:</code><br>
     <code>ORA-00937: not a single-group group function</code></p>
  
  <p>Can someone help me?</p>