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()

——————–

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s