Skip to content

Instantly share code, notes, and snippets.

@dangnhdev
Created September 18, 2017 09:46
Show Gist options
  • Save dangnhdev/dde0a08feba9f603ad30a94db365699a to your computer and use it in GitHub Desktop.
Save dangnhdev/dde0a08feba9f603ad30a94db365699a to your computer and use it in GitHub Desktop.
db.log_pub_postback.aggregate(
// Pipeline
[
// Stage 1
{
$match: { "refcode": "betelgues", "date_postback": NumberInt(170915), "response_code": NumberInt(200), "app_key": "detoxic-vn" }
},
// Stage 2
{
$group: {
_id: "$click_id"
}
},
]
// Created with Studio 3T, the IDE for MongoDB - https://studio3t.com/
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment