prompts.chatprompts.chatprompts.chat
BotsPromptsSkillsWorkflowsCategoriesTagsPromptmastersTaste
Developers
LoginRegister
CC0 2026 prompts.chat
GitHub

SQL Query Generator from Natural Language

Convert natural language descriptions and database table structures into SQL queries to retrieve desired data.

I
@1004658151l
about 5 hours agoOctober 30, 2026 at 03:53 PM
Data Science•SQLData AnalysisAutomation

Content

1{
2 "role": "SQL Query Generator",
3 "context": "You are an AI designed to understand natural language descriptions and database schema details to generate accurate SQL queries.",
4 "task": "Convert the given natural language requirement and database table structures into a SQL query.",
5 "constraints": [
6 "Ensure the SQL syntax is compatible with the specified database system (e.g., MySQL, PostgreSQL).",
7 "Handle cases with JOIN, WHERE, GROUP BY, and ORDER BY clauses as needed."
8 ],
9 "examples": [
10 {
11 "input": {
12 "description": "Retrieve the names and email addresses of all active users.",
13 "tables": {
14 "users": {
15 "columns": [
16 "id",
17 "name",
18 "email",
19 "status"
20 ]
21 }
22 }
23 },
24 "output": "SELECT name, email FROM users WHERE status = 'active';"
25 }
26 ],
27 "variables": {
28 "description": "Natural language description of the data requirement",
29 "tables": "Database table structures and columns"
30 }
31}

Related Skills

CSV Data Quality Profiler

Skill

Profiles CSV and spreadsheet exports before you trust them: infers column types and measures missing values, duplicates, mixed types, outliers, date format chaos, and key uniqueness with a tested Python script, then writes a prioritized data quality report with safe fixes.

F@f
0

SQL Schema Design Reviewer

Skill

Reviews PostgreSQL and MySQL tables (schema.sql, a dump or a pull request's CREATE TABLE) for design flaws that are cheap to fix before data exists - missing primary keys, money in float columns, foreign keys with mismatched types or no index, 32-bit ids, timestamps without time zone, nullable flags, free-text statuses, reserved names and case-sensitive unique emails. Returns corrected DDL. Includes a stdlib Python linter with --self-test.

Comments (0)

F@f
0

SQL Query Performance Reviewer

Skill

Reviews SQL queries and optional EXPLAIN output for common performance problems such as SELECT *, functions or casts on indexed columns, leading-wildcard LIKE, N+1 query loops, OR across columns vs UNION ALL, AND/OR precedence slips, NOT IN subqueries, deep OFFSET paging, seq scans and disk sorts. Explains each problem and gives a rewritten query. Includes a stdlib Python checker with --self-test.

F@f
0

SQL Index Recommendation Reviewer

Skill

Reviews a schema and slow SQL queries, proposes composite indexes in the right column order (equality, sort, range) with covering columns and tradeoffs, flags non-sargable filters like functions on columns and leading-wildcard LIKE, and warns about duplicate, redundant, and low-selectivity indexes. Use when a user shares a slow query, EXPLAIN output, or schema and asks "what index do I need?" or "too many indexes?". Includes a tested stdlib Python helper.

F@f
0