title: MySQL - use round() in a group by function
body: <p>In MySQL, how would I use the round() function inside the group by function? Example of what I've tried:</p>
  
  <pre><code>Table 1
  a     b
  1.3   5
  1.4   6
  2.7   8
  3.0   9
  
  Select round(a,0), avg(b)
  from Table1
  group by round(a,0)
  </code></pre>
  
  <p>Ideally this would give me an output like this:</p>
  
  <pre><code>round(a,0)    avg(b)
  1             5.5
  3             8.5
  </code></pre>
  
  <p>But this does not work. Any ideas?</p>
  
  <p>I am using Sequel Pro on a Mac</p>