how to get maximum value in mongoose query . in SQL it is easy
SELECT MAX(LAST_MOD) FROM table1
Where field1=1
i want Equivalent of above SQL code in mongoose(node.js)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
MongoDB supports max/min, but they don’t recommend using it in real applications :
http://www.mongodb.org/display/DOCS/min+and+max+Query+Specifiers
You could pretty much have the same result with :