SQL From a Question in English

Featured intermediate
0.0 0 uses Aug 14, 2026 Data & Analysis
Works with: ClaudeChatGPTGitHub Copilot
Save
The Prompt
Write a [DIALECT] query that answers this question:

[QUESTION]

Schema:
[SCHEMA]

Return:
1. The query, formatted and commented where a clause is non-obvious
2. Every assumption you made — especially about NULLs, duplicates, time zones and what counts as "active"
3. Any place the schema is ambiguous enough that a reasonable person would write a different query, and what you would need to know to decide
4. A rough note on what will be slow at scale and which index would fix it

Do not invent columns. If the question cannot be answered from this schema, say which column is missing.
Variables — replace these:
[QUESTION]· The question in plain English [SCHEMA]· Table definitions [DIALECT]· e.g. MySQL 8, PostgreSQL, BigQ...
Use with these AI models
Claude
Anthropic
Use Now
ChatGPT
OpenAI
Use Now
GitHub Copilot
GitHub
Use Now
Related Prompts
Find the Finding in a Dataset
Data & Analysis · text

Turns numbers into the one sentence a decision-maker needs, with the caveat attached.

0.0 0
Spreadsheet Formula Explained Both Ways
Data & Analysis · code

Writes the formula and explains it in English, so you can maintain it later.

0.0 0
Cohort Retention Read-Out
Data & Analysis · text

Reads a retention table the way an analyst would, including what looks like a trend and is not.

0.0 0
Rate this Prompt
0.0 · 0 ratings
Log in to rate
Performance
0
Uses
0
Copies
0
Saves
0
Shares
Prompt Details
CategoryData & Analysis
Typecode
Difficultyintermediate
Tokens340
CreatedAug 14, 2026
UpdatedAug 14, 2026
Share