M001: Ch:4 : Lab:1 Comparison Operators

How could 8065 be the correct answer when I get only 8062 on both the terminal as well as in the WEB IDE. Confused! Any thoughts.!

Most likely you do not have the correct query or not using the same data set.

Since it is much more easier for us to see if the query wrong rather than the data set, start by posting your query and we will see if we need to dig deeper.

1 Like

This query has been used

Atlas atlas-kiuwnm-shard-0 [primary] sample_training> db.zips.countDocuments()

Used this to count the total number of documents

Your total count of documents matches mine.

Your query on my data set provides me with the correct answer.

My conclusion is that you have modified the field pop of some documents. I noticed that some exercises from Chapter 3: Creating and Manipulating Documents - Updating Documents - mongo shell make us modified the pop field of some documents.

I do not think you should then worry as your query is correct. You got the wrong answer because the data set was altered. May be the course exercise should make us play with collections others that then one used in the queries.

Enjoy the rest of the course.