title: MySQL: Is it possible to compute MAX( AVG (field) )?
body: <p>My current query reads:</p>
  
  <pre><code>SELECT entry_id, user_id, cat_id, AVG( rating ) as avg_rate
  FROM `entry_rate`
  WHERE 1
  GROUP BY entry_id
  </code></pre>
  
  <p><code>cat_id</code> relates to different categories: 1, 2, 3 or 4</p>
  
  <p>Is there a way I can find the maximum average for <b>each user</b> in <b>each category</b> without setting up an additional table? The return could potentially be 4 maximum avg_rate for each user_id</p>
  
  <p>Visit the link below for example:</p>
  
  <p><a href="http://lh5.ggpht.com/_rvDQuhTddnc/S8Os_77qR9I/AAAAAAAAA2M/IPmzNeYjfCA/s800/table1.jpg" rel="nofollow noreferrer">http://lh5.ggpht.com/_rvDQuhTddnc/S8Os_77qR9I/AAAAAAAAA2M/IPmzNeYjfCA/s800/table1.jpg</a></p>