title: Find all documents within last n days
body: <p>My <code>daily</code> collection has documents like:</p>
  <pre><code>..
  { &quot;date&quot; : ISODate(&quot;2013-01-03T00:00:00Z&quot;), &quot;vid&quot; : &quot;ED&quot;, &quot;san&quot; : 7046.25, &quot;izm&quot; : 1243.96 }
  { &quot;date&quot; : ISODate(&quot;2013-01-03T00:00:00Z&quot;), &quot;vid&quot; : &quot;UA&quot;, &quot;san&quot; : 0, &quot;izm&quot; : 0 }
  { &quot;date&quot; : ISODate(&quot;2013-01-03T00:00:00Z&quot;), &quot;vid&quot; : &quot;PAL&quot;, &quot;san&quot; : 0, &quot;izm&quot; : 169.9 }
  { &quot;date&quot; : ISODate(&quot;2013-01-03T00:00:00Z&quot;), &quot;vid&quot; : &quot;PAL&quot;, &quot;san&quot; : 0, &quot;izm&quot; : 0 }
  { &quot;date&quot; : ISODate(&quot;2013-01-03T00:00:00Z&quot;), &quot;vid&quot; : &quot;CTA_TR&quot;, &quot;san&quot; : 0, &quot;izm&quot; : 0 }
  { &quot;date&quot; : ISODate(&quot;2013-01-04T00:00:00Z&quot;), &quot;vid&quot; : &quot;CAD&quot;, &quot;san&quot; : 0, &quot;izm&quot; : 169.9 }
  { &quot;date&quot; : ISODate(&quot;2013-01-04T00:00:00Z&quot;), &quot;vid&quot; : &quot;INT&quot;, &quot;san&quot; : 0, &quot;izm&quot; : 169.9 }
  ...
  </code></pre>
  <p>I left off <strong>_id</strong> field to spare the space here.
  My task is to &quot;fetch all documents within last 15 days&quot;. As you can see I need somehow to:</p>
  <ol>
  <li>Get 15 unique dates. The newest one should be taken as the newest document in collection (what I mean that it isn't necessary the today's date, it's just the latest one in collection based on <strong>date</strong> field), and the oldest.. well, maybe it's not necessary to strictly define the oldest day in query, what I need is some kind of top15 starting from the newest day, if you know what I mean. Like 15 <em>unique</em> days.</li>
  <li><strong>db.daily.find()</strong> all documents, that have <strong>date</strong> field in that range of 15 days.</li>
  </ol>
  <p><strong>In the result, I should see all documents within 15 days starting from the newest in collection.</strong></p>