Chapter 3: Deeper | Array Operators: $elemMatch

Hi everyone, i made the quiz query correctly and the results found where 0.
Did i miss and update to the cluster? like loading some “data.js” ?
If not, then the data is wrongly put.

the query i used : “db.survey.find({results: {$elemMatch: {“product”: “abc”, “score”: {$gt: 7}} }}).count()”
note that is the same one that the course offers as correct answer.

Thanks all !!

Hi @Lautaro_46709,

No, this dataset is already present in the Atlas class cluster so you don’t have to do anything here.

Most of the times users are issuing query on the wrong database and hence it results into error as db variable is pointing to some other database than what you were expecting.

Also I’m not sure why you are using the $gt operator here. For more information on what this operator does, please refer our documentation.

If you have any other query, please feel free to reach out to us.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

1 Like