title: #1111 - Invalid use of group function
body: <p>I am using the following query in an attempt to get  total number(sum) of slides retrieving the max number from each project, however I am receiving the following error (#1111 - Invalid use of group function). Here's the query:</p>
  
  <pre><code>SELECT COALESCE(project,'Total') as Project, SUM(MAX(slides)) as Slides 
  FROM projects_tbl 
  WHERE date BETWEEN '2010-01-01' AND '2010-12-31' 
  GROUP BY Project with ROLLUP
  </code></pre>
  
  <p>If I remove the SUM(), then the it works, however, I do not get an accurate total for all of the projects/slides. </p>
  
  <p>Thanks in advance for any and all replies.</p>