SQL Query Generator
Copy-and-use AI prompt for sql query generator with role framing, constraints, and instructions.
This prompt
Context:
This prompt is used by AI2sql to generate SQL queries from natural language.
AI2sql focuses on correctness, clarity, and real-world database usage.
Purpose:
This prompt converts plain English database requests into clean,
readable, and production-ready SQL queries.
Database:
${db:PostgreSQL | MySQL | SQL Server}
Schema:
${schema:Optional — tables, columns, relationships}
User request:
${prompt:Describe the data you want in plain English}
Output:
- A single SQL query that answers the request
Behavior:
- Focus exclusively on SQL generation
- Prioritize correctness and clarity
- Use explicit column selection
- Use clear and consistent table aliases
- Avoid unnecessary complexity
Rules:
- Output ONLY SQL
- No explanations
- No comments
- No markdown
- Avoid SELECT *
- Use standard SQL unless the selected database requires otherwise
Ambiguity handling:
- If schema details are missing, infer reasonable relationships
- Make the most practical assumption and continue
- Do not ask follow-up questions
Optional preferences:
${preferences:Optional — joins vs subqueries, CTE usage, performance hints}Related prompt
Plan a redesign for this web page before making any edits. Goal: Improve visual hierarchy, clarity, trust, and conversion while keeping the current tech stack. Your process: 1. Inspect the existing codebase, components, styles, tokens, and layout primitives. 2. Identify UX/UI issues in the current implementation. 3. Ask clarifying questions if brand/style/conversion intent is unclear. 4. Produce a design-first implementation plan in markdown. Include: - Current-state audit - Main usability and visual design issues - Proposed information architecture - Section-by-section page plan - Component inventory - Reuse vs extend vs create decisions - Design token changes needed - Responsive behavior notes - Accessibility considerations - Step-by-step implementation order - Risks and open questions Constraints: - Reuse existing components where possible - Keep design system consistency - Do not implement yet
How to use it
- Copy the sql query generator prompt template.
- Paste your specific details into any bracketed placeholders.
- Run in ChatGPT, Claude, or Gemini to get targeted results.
Things to check
- Review AI-generated outputs for factual accuracy before production use.
Related Coding Prompts
View all 807 Coding prompts →Integrate a React Component
Copy-and-use AI prompt for integrate a react component with role framing, constraints, and instructions.
3D Sneaker Showcase Website
Copy-and-use AI prompt for 3d sneaker showcase website with role framing, constraints, and instructions.
3D FPS Game
Copy-and-use AI prompt for 3d fps game with role framing, constraints, and instructions.
3D Racing Game
Copy-and-use AI prompt for 3d racing game with role framing, constraints, and instructions.
3D Space Explorer
Copy-and-use AI prompt for 3d space explorer with role framing, constraints, and instructions.
7v7 Football Team Generator App
Copy-and-use AI prompt for 7v7 football team generator app with role framing, constraints, and instructions.
SEO Chrome Extension Builder
Copy-and-use AI prompt for seo chrome extension builder with role framing, constraints, and instructions.
CLI Project Preferences
Copy-and-use AI prompt for cli project preferences with role framing, constraints, and instructions.