title: Taking the average rating of each movie genre in Neo4j
body: <p>There is a node movie and there are three properties in this movie node which are <code>ratings</code>, <code>genre</code> and <code>releaseyear</code>. I would like to take the average rating of each genre. How should I go about doing that? The following is what I have:</p>
  
  <pre><code>MATCH(m:Movie)
  WHERE m.release_year &lt; 2010
  WITH collect(m.genre) as genre, avg(m.ratings) as rating
  RETURN genre, rating
  ORDER BY rating
  </code></pre>