← Prompt library
Data & analysisFree→ ChatGPT / Claude

SQL From Plain English

Describe the question; get a correct, explained query and test plan.

What you get: A query with explanation, assumptions and a way to verify the result.

input
output — ChatGPT / Claude
Write a {{database}} SQL query to answer: {{question}}

Schema (tables, columns, types, keys, relationships): {{schema}}
Sample rows (anonymized): {{sample_rows}}

Return: the query formatted for readability; a plain-English explanation of each clause; assumptions about the data (nulls, duplicates, time zones, soft deletes); edge cases that could give wrong answers; a quick check I can run to verify the result (such as comparing with a known total); and a faster variant if the tables are large. Ask me about any ambiguity in the question before guessing.