From a question to a query you can check.

Describe the data you need. The prompt carries your schema, names the dialect, and asks for the query with an explanation, so you can verify it before you run it.

What the prompt you get back gets right

Schema in, guesswork out

Your tables and columns go into the prompt, so the model works from your actual names instead of inventing plausible ones.

Dialect named

Postgres, MySQL, BigQuery and the rest differ in the details — the prompt states which one you are on.

Query plus explanation

You get the SQL and a plain-language walkthrough of what it does, in that order.

Guardrails included

Read-only, no destructive statements, a row limit, and every assumption about your data listed explicitly.

From a rough note to a working prompt

Your note

“which customers ordered twice last month but haven't since?”

The prompt you get back

Role
an analyst who works only from the schema you provide
Schema
the tables and columns involved, pasted in as-is
Task
your question, stated as the result you want back
Output
the query first, then a plain-English explanation, then any assumptions it made
Guardrails
read-only, no destructive statements, row limit, and flagged assumptions

Every prompt is written for your exact request — this is the structure it comes back in, not a fixed template.

Common questions

Is it safe to run what comes back?

The prompt asks for a read-only query plus an explanation and its assumptions. Read the explanation, check the assumptions against your data, and run it with a row limit or against a copy first.

What if my schema is large?

Paste only the tables involved. The prompt requires the model to state any assumption it makes about columns it was not given, rather than silently guessing.

Try it with your own notes

One pass in, a structured prompt out — saved to your library so you can reuse it.

Engineer my prompt

Other tasks people engineer prompts for: