Skip to content

Instantly share code, notes, and snippets.

@mehdimehdi
Created December 9, 2011 02:09
Show Gist options
  • Save mehdimehdi/1449796 to your computer and use it in GitHub Desktop.
Save mehdimehdi/1449796 to your computer and use it in GitHub Desktop.
Mongo Grou query
{
"ts": {
"$date": "2011-12-08T01:40:21Z"
},
"info": "query punchtab.$cmd ntoreturn:1 command: { group: { $reduce: function (doc, prev) {\n if (doc.points > 0) {\n prev.total_po..., ns: \"activity\", cond: { date_created: { $gte: new Date(1320715369546) }, points: { $ne: 0.0 }, user_id: { $nin: [ 26039.0, 26715.0, 44624.0, 57951.0, 61329.0, 61604.0, 84368.0, 85620.0, 86239.0, 86247.0, 86262.0, 86412.0, 100464.0, 129716.0, 142514.0 ] }, publisher_id: 7573.0 }, key: { user_id: 1.0 }, initial: { total_points_earned: 0.0, redeemable_points: 0.0 } } } reslen:108097 476ms",
"millis": 476
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment