Created
January 25, 2015 15:04
-
-
Save oreillyross/db42a7f178405cc5d479 to your computer and use it in GitHub Desktop.
kind of got the solution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cursor = db.students.aggregate( | |
[ { "$unwind": "$scores" }, | |
{"$match": {"scores.type": "homework"}}, | |
{"$group": { '_id':'$_id' , 'minitem': {'$min': "$scores.score" }}} | |
] ); | |
db.students.update({'_id':19},{'$pull':{'scores':{'score':49.43132782777443}}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment