Professional

AI Prompts for Data Analysts

Copy-paste AI prompts for data analysts, writing SQL, Python/pandas help, explaining findings in plain language, structuring reports, and presenting data to stakeholders.

Who These Prompts Are For

Business analysts, data analysts, BI analysts, and anyone who extracts insights from data and needs to communicate them, in any industry or tool stack.

How to Use These Prompts

Copy any prompt and paste it into ChatGPT, Claude, or another AI tool. Replace the brackets [ ] with your specific details.


SQL Prompts

Write a SQL query:

Write a SQL query to: [describe what you need to accomplish]

Table structure:
- [table name]: [relevant columns and what they contain]
- [table name]: [relevant columns and what they contain]

What I need:
- Output columns: [what I want to see]
- Filter conditions: [any WHERE conditions]
- Grouping or aggregation: [if applicable]
- Sort order: [if applicable]

Database: [PostgreSQL / MySQL / BigQuery / Snowflake / other]

Debug a SQL query:

This SQL query is returning an error or wrong results.

Query: [paste query]
Error message (if any): [paste error]
Expected output: [describe what you expected]
Actual output or behavior: [what's happening]

What's wrong and how do I fix it?
Also explain why it was failing so I understand for next time.

Optimize a slow query:

This SQL query is running too slowly. Help me optimize it.

Query: [paste query]
Table sizes: [approximate row counts for the main tables]
Current runtime: [how long it takes]
Database: [type]

Suggest:
1. What's likely causing the slowness
2. Optimized version of the query
3. Whether an index would help (and on what columns)

Python / Pandas Prompts

Write data transformation code:

Write Python/pandas code to: [describe the transformation]

My dataframe has these columns: [list columns and what they contain]
What I want to achieve: [describe the output or transformation]
Edge cases to handle: [nulls, duplicates, date formats, etc. if applicable]

Write clean, readable code with brief comments explaining the key steps.

Explain code I don’t understand:

Explain what this code does, step by step, in plain English.

Code: [paste code]

After explaining:
- Are there any potential issues or edge cases it doesn't handle?
- Could it be simplified or made more efficient?
- What would I need to change if [describe a variation]?

Insight Communication Prompts

Explain a finding in plain language:

Help me explain this data finding to a non-technical stakeholder.

What the data shows: [describe the metric, trend, or result in technical terms]
The context: [what period, what segment, what changed]
Why it matters: [the business implication]

Write an explanation that:
- Leads with the business insight, not the methodology
- Avoids technical jargon (no confidence intervals unless they ask)
- Answers "so what?" — what should someone do with this?
Under 150 words.

Write an analysis narrative:

Write a narrative for this [report / dashboard / analysis].

Audience: [who reads this — executive team / marketing / operations]
Key metrics: [list the main numbers and comparisons]
What went well: [summary]
What needs attention: [summary]
Recommended actions: [your thinking]

Write a clear narrative (under 400 words) that leads with the most important finding and tells a coherent story from the data — not just a list of numbers.

Structure a data presentation:

Help me structure a presentation of data findings for [audience — exec team / product team / client].

My main finding: [what the data shows]
Supporting evidence: [the key data points]
My recommendation: [what should happen based on this]

Help me:
- Lead with the recommendation (not the data)
- Structure a 5-minute verbal presentation
- Anticipate the 3 most likely questions and how to answer them simply
- Avoid slides that are just tables of numbers

Analysis Planning Prompts

Design an analysis:

I need to answer this business question with data: [the question]

Available data: [describe what you have access to]

Help me:
1. What metrics and dimensions do I actually need to answer this well?
2. What gaps in the data might limit the analysis?
3. What's the best analytical approach or method for this type of question?
4. What confounders or pitfalls should I account for?
5. A brief analysis plan I could share with stakeholders before starting

Write a data dictionary entry:

Write a data dictionary entry for this field/metric.

Field name: [name]
What it measures: [describe]
How it's calculated: [formula or logic if applicable]
Source: [where the data comes from]
Update frequency: [how often it refreshes]
Common misunderstandings: [if any]
Related fields: [other relevant columns]

Write clearly enough that someone new to the data could use this field correctly without asking questions.

Continue learning

Explore related guides, tools, workflows, and prompts that help you go deeper into this topic.

More prompts for every use case

Browse the full prompt library — search by keyword or filter by category to find copy-paste prompts for your work.

Frequently Asked Questions

Can AI write reliable SQL and Python for data analysis?

AI writes syntactically plausible code that often has logical errors on specific real datasets. Always test every query and script before using the output. Use AI to generate a starting point, then review and validate against your actual data.

What's AI most useful for in data analytics work?

Writing and debugging code faster, translating technical findings into plain language for non-technical stakeholders, structuring analytical reports, and suggesting analytical approaches when you're unsure where to start.

Last updated: