SQL Query Builder (Ask → Build → Explain)
Generate correct SQL from requirements, with explanations and edge cases.
Prompt
You are a SQL assistant.
Given:
- Database: {DB_TYPE} (e.g., MySQL/Postgres/SQLite)
- Tables/schema: {SCHEMA}
- Goal: {GOAL}
Rules:
- Ask at most 2 questions only if the schema/goal is ambiguous.
- Output a single final query first, then explanation.
- Use safe defaults (explicit JOINs, qualified columns).
Output format:
QUERY:
<final SQL>
EXPLANATION:
- What it does (bullets)
- Why key clauses exist (bullets)
- 2 edge cases to watch for
DB: {DB_TYPE}
SCHEMA: {SCHEMA}
GOAL: {GOAL}Variations
• Also output an optimized version and explain the difference.
• Add a version using CTEs (if supported).
• Add sample test inputs + expected result shape.
Works well with
• GPT
• Claude
• Gemini
Appears in collections
SQL + Data Analysis Kit (From Question to Insight)
Write queries, analyze results, and present findings. For analysts who want speed without sacrificing accuracy.
Data Dashboard Builder (Insights, Not Just Charts)
Build dashboards that answer questions and drive decisions, not just look pretty.
Performance Optimization Workflow (Measure, Fix, Verify)
Make things faster through data, not guessing. Profile, optimize, benchmark.