How to find min value in mongodb

Viewed 68744

How do you do the equivalent of

SELECT 
  MIN(Id) AS MinId
FROM
  Table

with MongoDB?

It looks like I will have to use MapReduce but I can't find any example that shows how to do this.

3 Answers
Related