05 - MongoDB Aggregation Flashcards
1
Q
Syntax when using pipeline
A
collection = "tweets" pipeline = [$stage1, $stage2, ...$stageN] db.<COLLECTION>.aggregate( pipeline, { options } )
2
Q
$match
A
Similar to find()
3
Q
$project
A
Shape documents
4
Q
$sort
A
Like the cursor method of the same name
5
Q
Define & list
$group
LIst - 4
A
Used to aggregate field values from multiple documents
$sum
$avg
$min
$max
6
Q
$limit
A
Used to limit the amount of documents returned
7
Q
$unwind
A
Separates documents with arrays
8
Q
$out
A
Specifies an output collection
9
Q
Similar to find()
A
$match
10
Q
Shape documents
A
$project
11
Q
Like the cursor method of the same name
A
$sort
12
Q
Used to aggregate field values from multiple documents
$sum
$avg
$min
$max
A
Define & list
$group
LIst - 4
13
Q
Used to limit the amount of documents returned
A
$limit
14
Q
Separates documents with arrays
A
$unwind
15
Q
Specifies an output collection
A
$out