Chapter 4 LAB 1

db.zips.find({ “pop”: { “$lt”: 1000 }}).count()
MONGO DB’s answer was “8065”
But when I run the same command in my shell in MongoDB Compass it shows count of “8078”

Hi @Harshwardhan_Kurale, :wave:
It seems like there might be a typo in compass query, like $lte in place of $lt.

If that’s not the case, can you please post a screenshot of the query and results in compass?

I hope it helps.

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

Post screenshot that shows how and where you got the 8065.

@SourabhBagrecha @steevej

Looks like your data got changed

Try to load sample data again and run the query
It will give correct result

@Ramachandra_Tummala thanks my data got changed I reloaded the dataset and the answer I got was 8065.

1 Like

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