Final exam question 5

Hi
in final question 5, the question is “Which of the following choices is still going to produce the expected results and likely improve the most the execution of this aggregation pipeline”

so for me it was mandatory that the new pipeline should produce same ouput as the initial one.

The “correct” answer is likely to improve execution, but it does not produce the expected results

I think that the “correct” pipeline should be modified or the question changed.

g

This one is hard to discuss without revealing too much of the answer.

The only thing I can say is that it most certainly returns the correct results. I’m guessing that the requirement that you think isn’t met is this, “minimum number of sunny days is 200”? Correct me if I’m wrong.

Hi @giuseppe_98802,

Please check your discourse inbox and let me know if you have any questions.

Thanks,
Sonali

yes, you are right.
but from my point of view every answer is wrong.

last two pipelines are wrong because one returns only min and the other only average.

so I ruled out this two pipeline for a logical reason.

but I still had to choose an answer to go on.

I think the right pipelin should be changed.

and it would be great if you could also change my vote

g

1 Like

@giuseppe_98802, clearly not all options give the correct result, however, the chosen answer is correct. If you’re in doubt, I would suggest that you create a sample test collection to try it out for yourself.

We can’t discuss exam answers in a public thread such as this that’s why @Sonali_Mamgain (the Curriculum Services Engineer for this course) has sent you a private message. Please find that private message and chat directly with her.

what I mean is…

your pipeline for comparison

var pipeline = [
{"$addFields": { “min”: {"$min": “$sunnydays”}}}, <— returns min
{"$addFields": { “mean”: {"$avg": “$sunnydays” }}},<— returns mean
{"$sort": {“city”: 1}},
{"$match": { “country”: “USA”, “min”: {"$gte": 200}, “mean”: {"$gte": 220}}}
]

your question

Which of the following choices is still going to produce the expected results and likely improve the most the execution of this aggregation pipeline

your answer

<deleted>
<deleted>

right?
g

Because you’ve posted the answer in a public discussion, I’ve requested for @Sonali_Mamgain, @kanikasingla or @Shubham_Ranjan (if he’s around) to make this thread private. Once that’s done, I’ll explain why the answer is still correct.

Hi @giuseppe_98802,

It is recommended not to post the answers directly in the forums.
I am removing the pipelines that you have shared in the post. However, we can discuss more about it in the discourse private messages.

Thanks,
Sonali

1 Like