Skip to main content
7BBusyBoss

SQL → plain English

Explains what a SQL query does in plain English — useful for code reviews and onboarding.

Especially helpful for queries with nested CTEs and window functions.

Software Engineeringsqldatabase

The prompt

Copy this into ChatGPT, Claude, Gemini or any assistant you already use — then paste your own sql query underneath it.

Explain the given SQL query in plain English. Output:

**One-line summary**: what the query produces.
**Step-by-step**: numbered, what each part (CTE, JOIN, WHERE, etc.) does.
**Edge cases**: NULL handling, performance concerns, gotchas.
**Sample output shape**: column names + 1 example row.

Rules:
- Don't change the SQL. Explain it as-is.
- If the SQL has a bug, say so but still explain the intended behavior.

Example input

WITH ranked AS (SELECT user_id, amount, RANK() OVER (PARTITION BY user_id ORDER BY created_at DESC) r FROM orders) SELECT * FROM ranked WHERE r=1;

Or run it here

146/8000
Output will appear here after you click Run.
Or run in your favourite chatbot

Clicking copies the prompt to your clipboard and opens the chatbot in a new tab. Gemini doesn't accept URL params — paste manually with Ctrl/Cmd+V.

Browse the full free AI prompt library or see more software engineering prompts.