MongoDB Search

Which of the choices below is the title of a movie from the year 2013 that is rated PG-13 and won no awards? Please query the video.movieDetails collection to find the answer.

db.movieDetails.find( { $and :[{“year”:2013},{“rated”:”PG-13″}, { awards : { $exists : true } }]})

db.movieDetails.find( { $and :[{“year”:2013},{“rated”:”PG-13″},{“awards.wins”:0}]})
Using the video.movieDetails collection, how many movies list “Sweden” second in the the list of countries.

db.movieDetails.find({“countries.1”: “Sweden”}).count()



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.