title: How can I return more than one row from an SQL select statement with average function?
body: <p>I have a table <code>churchattendance</code>, with <code>monthId</code>, <code>GroupId</code>, and each group has a <code>district</code>. When I do a <code>select</code> statement to get the all the <code>district</code> names in that group, it works.</p>
  
  <p>Each of these districts should have an average attendance (<code>swschildren</code>, <code>mbsChildren</code> etc.) for a particular month, so I'm using the <code>average</code> function.</p>
  
  <p>When I tried this in MySQL, I only get one row, instead of all the districts with their average of attendance for the <code>monthId</code>. Is there a way I can do that with one SQL statement?</p>
  
  <pre><code>SELECT AVG(swsChildren) FROM churchattendance WHERE monthId=1 AND groupId=2
  </code></pre>
  
  <p>Inside the <code>groupId</code> of <code>2</code>, I have two districts - <code>districtIds</code> of <code>1</code> and <code>2</code>.</p>