title: Trying to get the average of a count resultset
body: <p>I have the following SQL:(bitemp)</p>
  
  <pre><code>SELECT COUNT (*) AS Count
    FROM Table T
   WHERE (T.Update_time =
             (SELECT MAX (B.Update_time )
                FROM Table B
               WHERE (B.Id = T.Id))
  GROUP BY T.Grouping
  </code></pre>
  
  <p>now I am getting a resultset with a lot of numbers. I want to get the average of this list. At the moment, I am importing the list into excel and use its average function. But there is a AVG function for DB2, but I did not get it to work.</p>
  
  <p>I tried <code>SELECT AVG(COUNT(*))</code> and also <code>SELECT AVG(*) FROM (theQuery)</code>.</p>