Chapter 4: Advanced CRUD Operations - Lab 2: Querying Arrays and Sub-Documents

Hello everyone,
Lab 2: Querying Arrays and Sub-Documents.
The problem given here is: To complete this exercise connect to your Atlas cluster using the in-browser IDE space at the end of this chapter.

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

When we shift to Chapter 4 IDE to perform the same, the same question, given in the Terminal is written in quiz_questions as: How many inspections from the sample_training.inspections collection were conducted in the city of New York? - New York has only initials in uppercase.

After writing the command for both of the NEW YORK as well as New York in mongoDB shell produces different answers. The Lab 2: Querying Arrays and Sub-Documents declares New York answer to be wrong. As i see there are 3 attempts to complete the lab, when i entered the response for city : NEW YORK (all CAPS) the answer from my query is returning +1 from original answer which system has stored and thus produced fail in Lab 2: Querying Arrays and Sub-Documents for me.

Not sure why my database collection : inspections is returning +1 to the system answer. I didn’t inserted any additional document with city as NEW YORK per my learning process.

I would like to know if there is a way to reattempt the problem and get a pass, as it was an issue with the problem itself? Please guide me with the same.

First of all you will need to achieve minimum 65% in this or any course to receive a proof of completion. If you are doing great their is no need to reattempt or get a passing grade.

Second, as the way your are explaining your problem clearly you misunderstood it. You could make sure which one is right simply using the data explorer. All you need to make sure what is inside the database.

Lastly, their is a huge difference between the result through search using NEW YORK and New York.

Hope this will help. Thanks

Hi @Noorul_Shafi_Mohammed, we have given you the credit for this lab & your scores have been updated as well.

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

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

Not sure if you understood my question at first place.
Regarding your explaination about New York Vs NEW YORK , i agree there is a huge difference that is something i just wanted make sure we are aware there is a typo with the question on IDE Vs in the training lab page.

But my concern was purely about the total count for the number of documents returned when we use NEW YORK which is the answer we are supposed enter to pass the LAB.
As i already mentioned previously that the count is showing as total count+1 on my database collection Vs what is expected by the system even though both my query and system query is same the answer is different. Also at the same time, I haven’t inserted any document by myself to cause total count +1.
Irrespective of i get the passing credit for this Lab question, i just wanted to clarify or correct whether the system answer need to be corrected with what is exact count in the database collections instead of the current system answer.

Hope this will give more clarity about my question. Thanks

Thanks for giving the credit for this lab.

But my concern was purely about the total count for the number of documents returned when we use NEW YORK which is the answer we are supposed enter to pass the LAB.
As i mentioned previously that the count is showing as total count+1 on my database collection Vs what is expected by the system even though both my query and system query is same but the answer is different. Also at the same time, I haven’t inserted any document by myself to cause total count +1.
I just wanted to clarify or correct whether the system answer need to be corrected with what is exact count in the database collections instead of the current system answer.

Thanks

+1 still happens when you modify any of the document not just by insert something new or not.

On my side, first I tested it then I came to the conclusion this all happened from your side. Now you got your credit back just cheers and

Happy Learning. Thanks

+1

I didn’t insert any new document to the collection an the query returns $ANSWER + 1 count