MongoDB query compiled from plain English against the ecommerce sample schema, then verified by running it.
{
"type": "aggregation",
"collection": "orders",
"pipeline": [
{}
]
}
$match — filters on totalCents, placedAt.totalCents stores money as an integer number of cents, so 10000 here means $100.00. Comparing against 100 instead is a common off-by-100 bug.:sevenDaysAgo is resolved when the query runs, not when it is written — so the query keeps meaning "the last N days" instead of freezing to a fixed date.Live output from running this query against the sample dataset.
| totalCents | status | placedAt | customerId | productIds |
|---|---|---|---|---|
| 10300 | shipped | 2026-07-29T23:50:41.117Z | 6a6fda00fce7f1a072eed010 | ["6a6fda00fce7f1a072eed013","6a6fda00fce7f1a072eed015"] |
| 19900 | cancelled | 2026-07-27T23:50:41.117Z | 6a6fda00fce7f1a072eed00f | ["6a6fda00fce7f1a072eed016"] |
Write this in plain English instead. Mask Databases compiles the sentence above into exactly this query at build time — no AI at runtime, and you can read the output in a diff.
Try it in the playground → No signup, runs in your browser.