Unable to return result from moviesDetails query

I am attempting to query the moviesDetails db to find out how many movies in the movieDetails collection have exactly 2 award wins and 2 award nominations.

I used the query below:

( { db.movieDetails.find { “awards.wins” :2, “awards.nominations” : 2 } )

but nothing is returned

See screenshot

Screen Shot 2020-02-16 at 5.26.18 PM

I am not sure what is happening with the mongo shell


Hi @Patrick_98227,

If you look very carefully, you will find that the syntax in all cases is slightly off. Suggest you review the lecture again paying closer attention to the query syntax, especially with respect to the parentheses “()” and braces “{}”. Here’s the documentation for find() as well.

Press Ctrl+D or Ctrl+C to come out of the elipsis(…) prompt. It just means that it’s expecting more input.

PS: Your first query syntax is much closer to the correct syntax

1 Like

thanks for the help…I will go back and look at the lecture

Let us know how it goes :+1:

Hi @Patrick_98227,

In addition to @007_jb,

Please make sure that you don’t have any typo in the query predicate. In some of your queries I see "award.nominations" rather than "awards.nominations".

Shubham Ranjan
Curriculum Services Engineer