Prompt
0 copies · 0 said it worked
Turn plain-English data requests into SQL queries
A structured role prompt that converts a natural language data requirement and table schema into a SQL query compatible with the chosen database system, including JOIN, WHERE, GROUP BY, and ORDER BY handling.
People use this for
- sql query generator from english
- natural language to sql
- write sql from plain english request
- i need a sql query for my table
- turn my data question into a query
Imported on Nov 29, 2026 from SQL Query Generator from Natural Language . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Prompt
{
"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 language requirement and database table structures into a SQL query.",
"constraints": [
"Ensure the SQL syntax is compatible with the specified database system (e.g., MySQL, PostgreSQL).",
"Handle cases with JOIN, WHERE, GROUP BY, and ORDER BY clauses as needed."
],
"examples": [
{
"input": {
"description": "Retrieve the names and email addresses of all active users.",
"tables": {
"users": {
"columns": ["id", "name", "email", "status"]
}
}
},
"output": "SELECT name, email FROM users WHERE status = 'active';"
}
],
"variables": {
"description": "Natural language description of the data requirement",
"tables": "Database table structures and columns"
}
}No result recorded for this import yet. Tried it? File a report so the next person knows how it went.
Tried it
Structured reports from people who ran this prompt. They roll up into the per-model badges above.
No one has filed a report yet. Try the prompt and be the first.
Related prompts
- SQL Index Recommendation Reviewer for slow queries and schemas
Reviews a schema and slow SQL queries, proposes composite indexes in the right column order, flags non-sargable filters, and warns about duplicate, redundant, and low-selectivity indexes, with a stdlib Python helper.
Data & Finance · @f
- Review SQL queries and EXPLAIN plans for performance and correctness problems
Skill-style prompt that makes the model act as a database engineer reviewing SQL and optional EXPLAIN output, flagging anti-patterns like SELECT *, function-wrapped columns, leading-wildcard LIKE, N+1 loops and AND/OR precedence, then returning rewritten queries with reasons and a measurement plan.
Coding · @f
- Security guardrails that keep an AI email assistant from being hijacked by malicious messages
A full system prompt giving an AI assistant that reads or manages email a security mindset: treat email as untrusted data, require approval for outward actions, avoid leaking private data, and report phishing and injection attempts calmly.
Productivity · @thanos0000
- Claude api: reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming,…
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any fo
Coding · @anthropic
- Build or optimise SQL queries with a structured database-engineer audit
A seven-step SQL architect prompt that builds a new query or audits and optimises an existing one, covering schema analysis, anti-patterns, execution plans, indexing, and a parameterised production query.
Coding · @sivasaiyadav8143
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.