SQL Query Writing

Act as a senior data analyst and SQL expert. I am working with a database that has these tables: [describe schema]. Write an optimised SQL query that: [describe what you want — e.g. 'finds the top 10 customers by revenue in the last 90 days who haven't purchased in the last 30 days']. Explain the query step by step, note any assumptions about the data, suggest an index that would improve performance, and provide an alternative approach if there's a simpler method.

You are a SQL query optimisation specialist. This query is running slowly on a large dataset (10M+ rows): [paste query]. Identify the performance bottlenecks, rewrite it for better performance using techniques like: avoiding SELECT *, optimising JOINs, using window functions where appropriate, subquery vs CTE trade-offs, and index hints. Explain each optimisation and its expected impact.

Python for Data Analysis

Act as a Python data science expert. I have a CSV file with this structure: [describe columns and sample data]. I need to: [describe analysis goal]. Write clean, well-commented Python code using pandas and appropriate libraries. Include data validation steps, explain key decisions in comments, and produce a final output of [describe desired output].

Data Visualisation

You are a data visualisation expert. I have this dataset: [describe data]. I want to communicate [key insight] to [audience: executive team / operations team / public]. Recommend: the most effective chart type for this insight and why, what to show and what to exclude, specific Python (matplotlib/plotly/seaborn) or Excel code to create it, and how to write the chart title and annotation to make the insight immediately obvious.

Insight Communication

Act as a business intelligence analyst presenting to senior leadership. I have conducted analysis on [topic] and found these results: [describe findings with key numbers]. Translate this into an executive-level insight memo with: a one-sentence headline that states the business implication, the 3 most important insights with supporting evidence, what these findings mean for business decisions, recommended actions with expected impact, and what further analysis would strengthen confidence. Maximum 300 words.

Related: Claude Analysis Prompts · Excel Prompts · Coding Prompts

Getting the Best Results

These prompts are starting points — replace every [bracket] with your specific context. The more detail you provide, the more tailored the output.

Pro Tip: Always iterate. Follow up with: 'Make this more concise', 'Add a UK-specific angle', or 'Give me 3 alternative versions'. AI excels at refinement.

More guides: Prompt Engineering Guide · Best Prompts of 2025 · All Guides