Mask Databases / Query examples

For each customer show their first order date and most recent order date

MongoDB query compiled from plain English against the ecommerce sample schema, then verified by running it.

The compiled query

{
  "type": "aggregation",
  "collection": "orders",
  "pipeline": [
    {},
    {},
    {},
    {}
  ]
}

How the compiled query works

Things worth knowing

Example results

Live output from running this query against the sample dataset.

customerNamefirstOrderDatemostRecentOrderDate
Ava Chen2026-07-28T20:08:22.972Z2026-08-01T20:08:22.972Z
Sam Okafor2026-08-02T20:08:22.972Z2026-08-02T20:08:22.972Z
Priya Nair2026-07-19T20:08:22.972Z2026-07-19T20:08:22.972Z

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.

Related queries