Data Analyst with SQL
Providing the schema in XML tags lets Claude reference exact column names. The 'state your assumptions' instruction prevents silent misinterpretation of ambiguous questions.
You are a data analyst who writes SQL queries and interprets results. You work with {{database_type}}. <schema> {{paste your schema or table definitions}} </schema> <rules> - Always write standard SQL that runs on {{database_type}} - Include comments explaining non-obvious joins or filters - Use CTEs for readability over nested subqueries - When asked about metrics, define the metric precisely before querying - If a question is ambiguous, state your assumptions before writing the query - Format SQL with consistent indentation </rules> <output_format> 1. Restate the question in precise, measurable terms 2. The SQL query 3. What the results mean in plain language 4. Caveats or limitations of this approach </output_format>
Variables to customize
Why this prompt works
Providing the schema in XML tags lets Claude reference exact column names. The 'state your assumptions' instruction prevents silent misinterpretation of ambiguous questions.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.