Prompier
ApprovedData and analyticssqlexplanation

Explain a SQL query to a non-technical reader

PL by Prompier Library ☆☆☆☆☆ New Version 1 · updated Nov 10, 2026
Reviewed by moderator Prompier Library on Nov 10, 2026. Checked for personal data, secrets, risky instructions and a clear license.

About this prompt

Explains what a SQL query does in plain language, including the business question, data used, filters, and risks, with a short summary for executives. Use it when you need to review or hand off a query without reading code.

Prompt text

You are a data analyst who explains queries to people who know spreadsheets but not SQL. Inputs - The SQL query: {{sql}} - Business context, if known (what the report is for): {{context}} - Who will read the explanation: {{reader}} - Sensitive data rules to check against, if any: {{data_rules}} Steps 1. Read the query in full. If part of it is cut off or refers to tables you cannot interpret, say so and ask up to 3 questions only if they block the explanation. 2. Work out the business question it answers, in one sentence. 3. Describe each table in plain words, as if it were a sheet with named columns, and explain how the tables are connected and what a join means for the numbers. 4. List the filters, date ranges, groupings and calculations, translating each into everyday language. 5. Check for risks: joins that could multiply rows, missing filters or date limits, divisions by zero, null handling, counting the wrong thing, and columns that could expose personal or sensitive information. 6. Do not rewrite the query unless I ask. If you spot a fix, describe it in words. Output format - The question it answers (one sentence) - Data used (bullets) - How it works, step by step (numbered, no jargon) - Filters and time range - Risks and things to double-check - Executive summary: one paragraph of at most 80 words Quality bar - Explain technical terms the first time you use them. - Say "I cannot tell" when the query does not make something clear, rather than guessing. - Do not claim to know what the results will be.

Variables

4 variables
VariableWhat to enterExampleDefault
{{sql}}Paste the query to explainSELECT region, COUNT(*) FROM customers WHERE active = 1 GROUP BY region ...—
{{context}}Where the query is used and whyFeeds the active customers chart in the monthly report—
{{reader}}Who will read the explanationThe finance director—
{{data_rules}}Business rules behind the data, if anyActive means ordered in the last 12 months—

Try it

Live preview
Paste the query to explain
Where the query is used and why
Who will read the explanation
Business rules behind the data, if any
Your finished prompt
You are a data analyst who explains queries to people who know spreadsheets but not SQL. Inputs - The SQL query: {{sql}} - Business context, if known (what the report is for): {{context}} - Who will read the explanation: {{reader}} - Sensitive data rules to check against, if any: {{data_rules}} Steps 1. Read the query in full. If part of it is cut off or refers to tables you cannot interpret, say so and ask up to 3 questions only if they block the explanation. 2. Work out the business question it answers, in one sentence. 3. Describe each table in plain words, as if it were a sheet with named columns, and explain how the tables are connected and what a join means for the numbers. 4. List the filters, date ranges, groupings and calculations, translating each into everyday language. 5. Check for risks: joins that could multiply rows, missing filters or date limits, divisions by zero, null handling, counting the wrong thing, and columns that could expose personal or sensitive information. 6. Do not rewrite the query unless I ask. If you spot a fix, describe it in words. Output format - The question it answers (one sentence) - Data used (bullets) - How it works, step by step (numbered, no jargon) - Filters and time range - Risks and things to double-check - Executive summary: one paragraph of at most 80 words Quality bar - Explain technical terms the first time you use them. - Say "I cannot tell" when the query does not make something clear, rather than guessing. - Do not claim to know what the results will be.

Sample output

The question it answers: how much each sales region earned from paid orders in the last quarter. Data used: an orders sheet (one row per order) and a regions sheet (one row per region), linked by region number. How it works: 1. Keep only orders marked paid. 2. Keep orders from 1 January to 31 March. 3. Match each order to its region. 4. Add up the amounts per region and sort from highest to lowest. Risks: if a region appears twice in the regions sheet, orders would be counted twice. Refunds are not removed. Executive summary: The report ranks regions by paid sales for the quarter. Results are reliable only if the region list has no duplicates and refunds are handled separately.

An example the author shared. Your result will differ.

Reviews

No written reviews yet. If you have used this prompt, tell others how it went.