I have a mongodb collection like:
db.kids.find()
//results
[
{name:'tom', age:10},
{name:'alice', age:12},
....
]
I need a query to get MAX 'age' from this collection
like in SQL: SELECT MAX(age) FROM kids WHERE 1
I have a mongodb collection like:
db.kids.find()
//results
[
{name:'tom', age:10},
{name:'alice', age:12},
....
]
I need a query to get MAX 'age' from this collection
like in SQL: SELECT MAX(age) FROM kids WHERE 1