title: Aggregate query with where condition
body: <p>How could the following SQL query be converted for Mongo:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT KeyID, SUM(Qty)
  FROM Table
  WHERE Date &lt;= '1998-12-01' 
  </code></pre>