Mask Databases / Query examples

Get the 10 most viewed blog posts

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

The compiled query

{
  "type": "find",
  "collection": "posts",
  "sort": {
    "views": -1
  },
  "limit": 10
}

How the compiled query works

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