AI Prompts for Data Analysts

Prompt AI to think like a data analyst — cleaner output, less back and forth

Data analysts need AI that understands the difference between a finding and a description. The best data prompts include the schema, the goal, the audience, and the output format — not just the question. These templates are built to produce structured, insight-led output that's ready for stakeholder consumption.

Top prompts for data analysts

1. Write a SQL query

Before

"Write a SQL query"

Too vague—AI has to guess what you want

After

"Write a PostgreSQL query using these tables: orders (order_id, customer_id, created_at, revenue), customers (customer_id, segment, country). Goal: calculate monthly revenue by customer segment for the last 6 months, with month-over-month percentage change. Include CTEs for clarity. Add a comment above each CTE explaining what it does."

Specific, clear, ready to use

2. Write a Python analysis script

Before

"Write a Python script to analyse my data"

Too vague—AI has to guess what you want

After

"Write a Python 3.11 script using pandas and matplotlib. Input: a CSV with columns date (YYYY-MM-DD), channel, sessions, conversions. Task: calculate conversion rate by channel and month, identify the top-performing channel per month, and output a summary CSV plus a bar chart. Add docstrings and handle missing values gracefully."

Specific, clear, ready to use

3. Summarise findings for stakeholders

Before

"Summarise my analysis"

Too vague—AI has to guess what you want

After

"You are a data analyst presenting findings to a non-technical executive team. Based on this analysis, write: (1) a 2-sentence headline finding (lead with the insight, not 'the data shows'), (2) top 3 supporting data points as bullets with specific numbers, (3) one hypothesis for the most unexpected finding, (4) one recommended action. Plain English throughout."

Specific, clear, ready to use

4. Suggest chart types

Before

"What chart should I use?"

Too vague—AI has to guess what you want

After

"I have this dataset: [describe data, e.g. monthly revenue by region over 2 years]. My goal is to show the trend over time and compare regions. Suggest the 3 most appropriate chart types, explain the strength and limitation of each, and recommend the best one with a justification. Consider the audience: senior non-technical stakeholders."

Specific, clear, ready to use

5. Generate a hypothesis

Before

"Why is this metric down?"

Too vague—AI has to guess what you want

After

"Act as a senior data analyst. Our weekly active users dropped 18% in the last 2 weeks. Generate 5 hypotheses that could explain this, ordered by likelihood. For each hypothesis: what data would confirm it, what data would rule it out, and what action we'd take if confirmed. Format as a structured investigation plan."

Specific, clear, ready to use

Quick tips for data analysts

Be specific about context

Include your industry, audience, or situation so AI understands the constraints

Set clear output format

Tell AI how to structure the response—bullets, paragraphs, tables, etc.

Define your tone

Specify if you want formal, casual, empathetic, or direct language

Add constraints

Set word limits, exclude certain phrases, or define what not to include

Build prompts that actually work

Try Prompt Orange free—answer a few questions and get a perfect prompt in under 2 minutes.

Get started free

No signup • No credit card • Works instantly

Get started free