title: Is there a way to compare two fields in a MongoDB query
body: <p>If I have a collection called game that has a schema like this.</p>
  <pre><code>{&quot;team&quot;: &quot;A&quot;, &quot;opponent&quot;: &quot;B&quot;, &quot;points&quot;: 101, &quot;opp_points&quot;: 100}
  {&quot;team&quot;: &quot;B&quot;, &quot;opponent&quot;: &quot;A&quot;, &quot;points&quot;: 100, &quot;opp_points&quot;: 101}
  </code></pre>
  <p>Is there a way to query on a comparison between two fields in the same collection?</p>
  <p>The SQL equivalent would be.</p>
  <pre><code>SELECT * FROM game where points &gt; opp_points;
  </code></pre>
  <p>I have looked through Mongo's documentation and haven't found this, but thought they probably have it.</p>