Data · Analyst
NL to SQL + explain
Prompt
Schema: [PASTE TABLE NAMES & COLUMNS]. Question: [PASTE]. Return: the SQL, an explanation of how the query answers the question in plain English, and the assumptions you had to make. Postgres dialect.
How to use this prompt
- Copy the prompt above.
- Paste into Claude, ChatGPT, or your preferred LLM.
- Replace anything in [BRACKETS] with your real inputs.
- Review the output before you send/ship — humans in the loop.
Best with
Most prompts here work in any modern LLM. For business reasoning and judgment, we recommend Claude. For fastest iteration with plugins, try ChatGPT.