greater than in mongodb code example
Example 1: mongodb greater than
db.yourDataBase.find({counter:{$gt:2}})
Example 2: mongodb less than
db.yourDatabaseName.find(counter:{$lt:100})
Example 3: mongodb greater than field value
collection.find( { $expr: { $gt: [ "$field1" , "$field2" ] } } )
#field1 greater than field2