title: SQL AVG returning an int
body: <p>In one of my queries it appears that the <code>AVG</code> function is returning an int.  </p>
  
  <pre><code>select ..., AVG(e.employee_level)avg_level
  </code></pre>
  
  <p>How do I get it to return floating point values? I tried casting it but all my rows for <code>avg_level</code> were still integers.</p>