Chapter 2: Importing, Exporting, and Querying Data Quiz: Data Explorer - zero answer


I enter the correct json query but it returns a 0 answer. What could be wrong.

I’m not sure if i should post my query here.


You may be connected to wrong DB.Does the collection you are querying exist?
You can check by
show collections
If collection exists it could be typo in the field/non existent field
Check again

1 Like

Hi @Yusuf_Belgore and welcome to the MongoDB Community. :wave:

It’s hard to know what the issue is if you don’t post the query you’re writing. I don’t know if this is one of the graded quizzes or not, but some things to try (in addition to what Ramachandra suggested):

  • Try running db.<collection_name>.find() to see if you get any results as this will return all documents for the collection.
  • If your current query has multiple query objects, try running them one at a time to see if you get expected results back. This will help you determine if you might have a typo in a field name or value.

If this is a non-graded quiz then there is no issues posting your query here. Even if it is graded, I’m sure someone else has posted their query here in the forums, so probably not that big of a deal either.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.