title: mongoexport aggregate export to a csv file
body: <p>I want to save the result from an aggregation into a csv file.</p>
  
  <p>Using the mongo cmd line tool I can do this to get the results I want:</p>
  
  <pre><code>db.compras.aggregate({ $group : { _id : "$data.proponente", total : { $sum : "$price" } }}
  </code></pre>
  
  <p>How would I translate this into a mongoexport command that saves results into a csv?</p>