Chapter 4: Advanced CRUD Operations( Lecture: Array Operators and Sub-Documents)

Lab 2: Querying Arrays and Sub-Documents

How many inspections from the sample_training.inspections collection were conducted in the city of NEW YORK?

Query: db.inspections.find({“”: “NEW YORK”}).count()

Answer: 18280

The answer is not accepted but it seems to be correct to me

Hi @LE_Mutugi,

Welcome to the MongoDB University Forums :sparkles:

I suspect your sample dataset might have been modified. Please re-load the sample dataset and try again.


1 Like

Hi @Kushagra_Kesav

Thank you for your response.

I still get the same value even after re-loading the sample dataset

Hi @LE_Mutugi,

> use sample_training
< 'switched to db sample_training'
> db.inspections.find({"": "NEW YORK"}).count()
< 18279


I guess a doucument must have been inserted

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