Hello!
I hope I am posting this in the right place.
I am learning mongoDB, following the MongoDB Basics course.
And here is a problem I have. In Atlas, Collections, Aggregation using sample_training.trips.
If I try a $match with :
“tripduration”: {$lte:70}
then 10 documents are selected.
If I try it with :
“tripduration”: {$gte:61}
then 20 documents are selected.
But if I try with :
“tripduration”: {$and:[$lte:70,$gte:50]}
It does not work and I see:
“Stage must be a property formatted document”
I wonder what I am missing. Looking at the values for tripduration (61, 70, …) some documents shoud be selected. Or the format I am using is wrong (as the message suggests), but what is wrong?