Optional lab Chapter 1

Hi Everybody,

I was working on the Optional Lab of Chapter 1 and I actually got a count which is 4 units lower the answer.

I believe that the reason for this is that at the end I grouped all my results with “_id”:“title”, since I didn’t want to have duplicate values (as per the exercise).

By removing the grouping I get the same result as the Quiz.

What do you think about this?

Thanks,
Gloriya

Hi! :slight_smile:

Sherlock Holmes has the same title for each movie, but they are all different year. So this “counts down”.

I guess the most important thing is you got the pipeline, but the result they give is correct.

2 Likes

Thanks for the explanation, Santiago.

I had the same confusion. Hate to nitpick on a free resource but if the criteria is “ignore duplicate titles” then the grouping is more appropriate to what is being asked.

Although at this point we’re not supposed to know about “$group” :rofl:

Edit: Oops sorry went back and read the criteria again, they do specify “duplicate entries” rather than “duplicate titles”. My apologies!

1 Like