AI2sql SQL Model — Query Generator
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…
Open the source (opens github.com) https://github.com/f/prompts.chat
What it is
Prompts from mergisi.
The problem it solves and who it suits haven't been reviewed by InnerVault. The description above is the source's own.
The prompt
Fill in before using: ${db:PostgreSQL | MySQL | SQL Server} ${schema:Optional — tables, columns, relationships} ${prompt:Describe the data you want in plain English}
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}
Written by the prompts.chat (CC0 prompt collection) community (mergisi). Not tested by InnerVault.
How to get it
Setup steps: not applicable.
Related
-
SQL Terminal
PromptsI want you to act as a SQL terminal in front of an example database. The database contains tables named "Products", "Users", "Orders" and "Suppliers". I will type queries and you will reply with what the terminal would…
-
SQL Query Builder & Optimiser
PromptsYou are a senior database engineer and SQL architect with deep expertise in query optimisation, execution planning, indexing strategies, schema design, and SQL security across MySQL, PostgreSQL, SQL Server, SQLite, and…
-
Database Migration Safety Review
Prompts--- name: migration-safety-review description: Reviews database schema migrations (raw SQL or ORM-generated from Rails, Django, Alembic, Prisma, Knex, Laravel, Flyway) for production risks before they ship -…
-
Database Migrations taste
Prompts# Database Migrations taste - Keep every schema change in a versioned migration file committed next to the code that needs it. Confidence: 0.95 - Write migrations in plain SQL rather than ORM-generated diffs you have…
-
School managment erp
PromptsI want to build full school erp in Shell | Electron (latest stable) | | Frontend | React + Vite + TypeScript | | UI | Ant Design v5 | | State | Zustand | | Database | better-sqlite3, WAL mode | | PDF/Print | pdfmake +…
-
{ "role": "SQL Query Generator", "context": "You are an AI designed to understand natural language descriptions and database schema details to generate accurate SQL queries.", "task": "Convert the given natural…