All AI prompts
Coding & Dev
SQL query from plain English
Includes schema questions and explains the plan.
The prompt
I want to answer this question with SQL: "[QUESTION]". My tables and columns: [PASTE SCHEMA]. First ask me any missing questions. Then produce: (1) the SQL query (Postgres flavor), (2) an English walkthrough of what each clause does, (3) an EXPLAIN-style note on likely performance issues.
Paste it into ChatGPT, Claude, Gemini or Midjourney and replace anything in [SQUARE BRACKETS] with your own details.
Related prompts
More Coding & Dev prompts from the library.
- Coding & DevGenerate unit tests for any functionHappy path, edge cases, and failure modes.
- Coding & DevPerfect conventional commit messageFollows conventional-commits, with body and footer.
- Coding & DevExplain any code line-by-lineGreat for reading unfamiliar codebases.
- Coding & DevRefactor messy code with reasoningCleaner version with a diff-style rationale.