Free Prompts for Data Analysis: SQL, Python & Visualization

Accelerate your data analysis workflow with free AI prompts. Write SQL queries, generate Python analysis scripts, clean datasets, create visualizations, and run statistical tests — all with tested copy-paste prompts.

Data analysis dashboard with charts

Free prompts for data analysis — analyze faster with AI

Data analysis involves many repetitive tasks: writing SQL, cleaning data, selecting the right chart, running statistical tests. These free prompts for data analysis automate the tedious parts so you can focus on insights. Each prompt works with ChatGPT, Gemini, and Claude. Browse our complete collection of 100+ free prompts for more categories.

1. SQL Query Generator

💡 Use case: Write complex SQL queries quickly.

Write a SQL query to [describe business question]. Use table [table_name] with columns [column list]. Requirements: JOIN [other table] on [key], filter WHERE [conditions], group by [dimension] with HAVING [filter], order by [column] [ASC/DESC], limit [number] results. Include: CTEs for readability if complex, window functions if ranking/running totals needed, NULL handling strategy, and query performance notes (indexes, execution plan). Target dialect: [PostgreSQL/MySQL/BigQuery/Snowflake].

Why it works: Specifying the dialect ensures the query uses the right syntax and functions.

2. Python Data Analysis

💡 Use case: Generate a complete analysis script.

Write a Python script to analyze this dataset. Steps: 1. Load data from [CSV/JSON/API] using pandas. 2. Data cleaning: handle missing values, remove duplicates, fix data types. 3. Exploratory Data Analysis: summary statistics, correlation matrix, outlier detection. 4. Visualization: 3 charts revealing key insights (choose appropriate chart types). 5. Statistical tests: run [t-test/chi-square/ANOVA] on relevant variables. 6. Export results to a summary report. Include comments explaining each step. Dataset description: [describe data].

Why it works: End-to-end script from loading to export means you get a complete analysis, not just a snippet.

3. Chart Recommendation Engine

💡 Use case: Choose the right visualization for your data.

I have data with these variables: [describe variables and types]. For each of the following analysis goals, recommend the best chart type and explain: Comparison (which chart shows differences clearly?), Relationship (which chart reveals correlations?), Distribution (which chart shows spread?), Composition (which chart shows parts of a whole?), Trend (which chart shows change over time?). For each recommendation: why this chart type, what to look for, and common mistakes to avoid.

Why it works: Matching chart type to analysis goal prevents common visualization mistakes.

4. Data Cleaning Pipeline

💡 Use case: Automate the tedious process of cleaning raw data.

Write a Python data cleaning pipeline that handles: missing values (detect, impute or drop with rationale), duplicates (identify and remove with logging), outliers (detect using IQR or Z-score, flag for review), inconsistent formats (dates, strings, categories — standardize), incorrect data types (cast to appropriate types), and validation checks (range checks, uniqueness, referential integrity). Log all changes made. Input: [file path or data description]. Output: clean data + cleaning report.

Why it works: A logged pipeline makes data cleaning reproducible and auditable.

5. Statistical Test Selection

💡 Use case: Choose and run the correct statistical test.

I want to test [research question]. My data characteristics: variable types (continuous/categorical/binary), number of groups (2 or more), sample size, paired or independent, normality assumption (met/violated/unknown). Which statistical test should I use? Walk through: test name and formula, assumptions and how to verify them, how to run the test in Python/R with code, how to interpret the p-value and effect size, and what to report (test statistic, df, p-value, effect size, CI).

Why it works: Full walkthrough from assumptions to reporting ensures you use the right test correctly.

6. Dashboard Layout Design

💡 Use case: Plan a data dashboard for stakeholders.

Design a dashboard layout for tracking [KPIs/metrics] for [audience: executives / analysts / operations]. Include: top row (3-5 most important KPIs as big number cards), middle section (trend charts with time comparison), bottom section (detail tables with search/filter), filter controls (date range, segment, dimension), refresh cadence recommendation, color coding rules (green/yellow/red thresholds), and mobile layout adaptation. Tools: [Tableau/PowerBI/Looker/Streamlit].

Why it works: Audience-specific design ensures the dashboard serves its users effectively.

7. A/B Test Analysis

💡 Use case: Analyze experiment results with statistical rigor.

Analyze these A/B test results. Control: [sample size, conversions, conversion rate]. Variant: [sample size, conversions, conversion rate]. Calculate: absolute lift, relative lift, statistical significance (p-value using chi-square or z-test), 95% confidence interval for the difference, practical significance (is the lift worth implementing?), and power analysis (was the sample size adequate?). Provide a clear recommendation: implement, iterate, or run longer.

Why it works: It calculates both statistical and practical significance, avoiding common misinterpretations.

8. Time Series Forecast

💡 Use case: Predict future values from historical data.

Given this time series data [describe or paste], forecast the next [time period]. Perform: decomposition (trend, seasonality, residuals), stationarity check (ADF test), model selection (ARIMA/SARIMA/Prophet/LSTM — explain choice), model fitting with parameter tuning, forecast with confidence intervals, and error metrics (MAE, RMSE, MAPE). Provide code in Python. Also explain: key drivers of the forecast, limitations, and when to retrain the model.

Why it works: Model explanation and limitations help you trust (or question) the forecast.

9. Cohort Analysis

💡 Use case: Understand user retention and behavior over time.

Perform a cohort analysis on this user activity data [describe]. Create: monthly cohorts based on first action date, weekly/daily retention table, cohort behavior comparison (what do retained vs churned users do?), and key insights (best/worst performing cohorts, retention patterns, inflection points). Provide Python/R code to generate the cohort table and heatmap visualization. Recommend 3 actions based on findings.

Why it works: Actionable recommendations based on cohort data help improve retention.

10. Data Storytelling Report

💡 Use case: Turn analysis into a compelling business narrative.

Turn this data analysis into a narrative for [executive/stakeholder] presentation. Structure: Context (what we analyzed and why), Conflict (the problem or insight revealed by the data), Resolution (what the data tells us to do), and Call to Action (specific next steps). For each section: include exact data points as evidence, 1 recommended visualization, and a plain-language explanation of what it means and why it matters. Keep it to 1 page.

Why it works: Narrative structure makes data memorable and actionable for decision-makers.

Analyze faster with AI

Get 500+ tested prompts for data analysis and more.

Browse 500+ Free Prompts →

Frequently Asked Questions

Can AI write accurate SQL queries?

Yes, AI can write complex SQL queries including JOINs, subqueries, and window functions. Always review generated queries, especially for performance-critical production use.

Are these data analysis prompts free?

Yes, every prompt on this page is completely free. Copy-paste into ChatGPT, Gemini, or Claude.

Which AI is best for data analysis?

Claude 4 excels at complex multi-step analysis. GPT-5 is great for writing clean Python code. ChatGPT and Gemini handle basic analysis well.

Can AI replace a data analyst?

AI handles repetitive coding and analysis tasks well, but human judgment is still essential for business context, data quality decisions, and strategic recommendations.