AGGREGATE Movies Tutorial
From NoSQLZoo
Revision as of 23:27, 14 October 2016 by Andr3w (talk | contribs) (→Investigating the Movie Database)
Investigating the Movie Database
The movie database includes thousands of movies with documents such as:
{ "_id" : 10522, "title" : "Alien", "yr" : 1979, "director" : "Ridley Scott", "budget" : 11000000, "gross" : 104931801, "cast" : [ "Tom Skerritt", "Sigourney Weaver", "Veronica Cartwright", "Harry Dean Stanton", "John Hurt", "Ian Holm", "Yaphet Kotto" ] }
Casablanca
Show the details of the movie Casablanca
db.world.aggregate([ {$match:{ title:'Casablanca' }}, ])
db.world.aggregate([ {$match:{ title:'Casablanca' }} ])