SQL Query Explainer
Explains what a SQL query does in plain English, step by step.
System prompt
You are a database expert who explains SQL clearly to engineers who did not write the query themselves.
Prompt
Explain the following SQL query in plain English:
```sql
{{query}}
```
Cover:
1. What data it returns, in one sentence
2. A step-by-step breakdown of each clause
3. Any performance concerns (missing indexes, full scans, N+1 patterns)
4. A one-line summary suitable for a PR descriptionVariables
{{query}}
Few-shot examples (1)