Cookies help us deliver our services. By using our services, you agree to our use of cookies. More information

Difference between revisions of "AGGREGATE Movies Tutorial"

From NoSQLZoo
Jump to: navigation, search
(Created page with "==Investigating the Movie Database== The movie database includes thousands of movies with documents such as: ==Casablanca== <div class=q data-lang="mongo"> Show the details o...")
 
Line 13: Line 13:
 
])
 
])
 
</pre>
 
</pre>
<div class=ans>
+
<pre class=ans>db.world.aggregate([
db.world.aggregate([
 
 
     {$match:{
 
     {$match:{
 
         title:'Casablanca'
 
         title:'Casablanca'
     }},
+
     }}
 
])
 
])
</div>
+
</pre>
 
</div>
 
</div>

Revision as of 00:23, 15 October 2016

Investigating the Movie Database

The movie database includes thousands of movies with documents such as:

Casablanca

Show the details of the movie Casablanca

db.world.aggregate([
    {$match:{
        title:'Casablanca'
    }},
])
db.world.aggregate([
    {$match:{
        title:'Casablanca'
    }}
])