Skip to content

Instantly share code, notes, and snippets.

@danared
Created November 2, 2015 18:08
Show Gist options
  • Save danared/b306dff730300c05488b to your computer and use it in GitHub Desktop.
Save danared/b306dff730300c05488b to your computer and use it in GitHub Desktop.
db.homeSales.aggregate([
{$match: {
amount: {$gte:3000000}}
},
{$lookup: {
from: "postcodes",
localField: "address.postcode",
foreignField: "postcode",
as: "postcode_docs"}
}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment