MongoDB query compiled from plain English against the blog sample schema, then verified by running it.
{
"type": "aggregation",
"collection": "posts",
"pipeline": [
{},
{},
{},
{},
{},
{},
{}
]
}
$sort — orders by publishedAt.$group — groups by "$authorId" and aggregates postId.$lookup — joins the authors collection on _id → _id.$unwind — flattens $author into one document per element.$lookup — joins the posts collection on postId → _id.$unwind — flattens $post into one document per element.$project — returns only authorName, postTitle, postPublishedAt.$group, postId takes the first value in the group — one output document per distinct "$authorId".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.