afigueredo
3/18/2019 - 5:08 PM

Find ORDER BY, LIMIT


db.alura.find().sort({"nome":1}) //Order by ASC
db.alura.find().sort({"nome":-1}) //Order by DESC

db.alura.find().sort({"nome":1}).limit(3)//Order by ASC and LIMIT