title: SQL Alchemy group_by in Query
body: <p>I am trying to select a grouped average.</p>
  
  <pre><code>a1_avg = session.query(func.avg(Table_A.a1_value).label('a1_avg'))\
           .filter(between(Table_A.a1_date, '2011-10-01', '2011-10-30'))\
           .group_by(Table_A.a1_group)
  </code></pre>
  
  <p>I have tried a few different iterations of this query and this is as close as I can get to what I need. I am fairly certain the group_by is creating the issue, but I am unsure how to correctly implement the query using SQLA. The table structure and expected output:</p>
  
  <pre><code>TABLE A
  A1_ID | A1_VALUE | A1_DATE    | A1_LOC | A1_GROUP
  1     |  5       | 2011-10-05 | 5      |  6      
  2     | 15       | 2011-10-14 | 5      |  6
  3     |  2       | 2011-10-21 | 6      |  7
  4     | 20       | 2011-11-15 | 4      |  8
  5     |  6       | 2011-10-27 | 6      |  7
  
  EXPECTED OUTPUT
  A1_LOC | A1_GROUP | A1_AVG
  5      | 6        | 10
  6      | 7        | 4
  </code></pre>