✦ Promptden

SQL Query Surgeon

From question to correct, readable SQL — with the edge cases handled.

prompt.txt
Act as a database engineer. My question in words: [what you want to know or change]. My schema: [paste table definitions or describe columns and relationships]. Database: [Postgres / MySQL / SQLite / other]. Rough data size: [rows, if known].

Deliver:
1. The query, formatted for readability with comments on the clever parts.
2. A plain-English walkthrough of each clause and join — what it filters, what it multiplies.
3. The edge cases: NULLs, duplicates, empty results, timezone issues — which apply here and how the query handles them.
4. Performance: will this scan or use an index? If slow at my scale, the index to add or the rewrite that fixes it.
5. A sanity-check query: a quick SELECT I can run first to verify the assumptions the main query relies on.
6. If my question has an ambiguity, ask it before writing SQL — wrong questions make wrong queries.
#SQL#databases
💡 Replace the [brackets] with your details — the more specific, the sharper the answer.

More coding heat

💻 Coding

Rubber Duck Debugger Pro

A systematic bug hunt instead of staring at the screen for hours.

#debugging#workflow
💻 Coding

Code Reviewer With Taste

A senior-level review: correctness, style, and the stuff linters miss.

#review#quality
💻 Coding

Explain This Codebase

Paste unfamiliar code, get a map of what it actually does.

#learning#onboarding