title: Mongoose first sort and limit by one property, then sort by another property
body: <p>How can I get those n dataset with the highest <em>count</em> but return them sorted by name?</p>
  
  <p>I tried the following, but that does not work.</p>
  
  <pre><code>db.Foo
        .find()
        .sort({'count': -1})
        .limit(n)
        .sort({'name': 1}) // does not work
        .exec(...);
  </code></pre>
  
  <p>Is there any other solution besides manually sorting the returned json array?</p>
  
  <p>Such like subqueries in SQL?</p>
  
  <pre><code>SELECT *
  FROM
  ( SELECT *
    FROM Foo
    ORDER BY count DESC
    LIMIT n
  ) AS tmp
  ORDER BY name ASC ;
  </code></pre>