title: Calculate average column value per day
body: <p>I have the following table structure: <code>Value</code> (stores random integer values), Datetime` (stores purchased orders datetimes).</p>
  
  <p>How would I get the average value from all <code>Value</code> rows across a full day?</p>
  
  <p>I'm assuming the query would be something like the following</p>
  
  <pre><code>SELECT  count(*) / 1
  FROM  mytable
  WHERE DateTime = date(now(), -1 DAY) 
  </code></pre>