title: How does Apache Cassandra do aggregate operations?
body: <p>I'm fairly new to Apache Cassandra and nosql in general.</p>
  
  <p>In SQL I can do aggregate operations like:</p>
  
  <pre><code>SELECT 
    country, sum(age) / count(*) AS averageAge 
  FROM people 
  GROUP BY country;
  </code></pre>
  
  <p>This is nice because it is calculated within the DB, rather than having to move every row in the 'people' table into the client layer to do the calculation.</p>
  
  <p>Is this possible in Apache Cassandra?  How?</p>