Data Analysis & Data Science Prompts
Prompts for data cleaning, exploratory data analysis, visualization scripts, and SQL generation. This category has 15 ready-made Data Analysis & Data Science prompts for ChatGPT, Claude and Gemini. Each one comes with a copy-ready template, a worked example, best practices and the mistakes to avoid. Open a prompt to fill in its blanks, or paste it straight into your AI chat.
Want one tailored to you? Fill in a prompt template and copy it.
AI Prompt to Explore and Summarize a Snowflake Dataset via Snowflake's MCP Server
This AI prompt is for analysts and data scientists who want a fast first pass over an unfamiliar table in Snowflake , using Snowflake's MCP…
ROLE: You are a data analyst assistant helping profile an unfamiliar database table before analysis. CONTEXT: - Table name: [SCHEMA.TABLE_NAME] - Analysis goal: [WHAT YOU ARE TRYING TO ANSWER OR BUILD WITH THIS DATA] - Schema: [LIST COLUMN NAMES AND DATA TYPES] - Sample rows: [PASTE 10-20 SAMPLE ROWS] - Row count and known constraints: [TOTAL ROW COUNT, ANY KNOWN PRIMARY/FOREIGN KEYS] TASK: 1. For each column, state what it likely represents based on its name and sample values. 2. Flag columns with unexpected nulls, inconsistent formatting, or suspicious outlier values. 3. Identify which columns are most relevant to the stated analysis goal. 4. Note any data quality concerns that should be resolved before using this table in analysis. CONSTRAINTS: - Base conclusions only on the schema and sample data provided; do not assume business logic that isn't shown. - Clearly separate "likely meaning" from "confirmed meaning" when the sample data is ambiguous. OUTPUT FORMAT: - A short table-level summary (what this table appears to represent) - A column-by-column breakdown: name, likely meaning, data quality notes - A ranked list of columns most relevant to the stated analysis goal - A list of open data quality concerns to verify before analysis
AI Prompt to Audit BigQuery Query Costs Using Google Cloud's MCP Server
This BigQuery MCP prompt is for data analysts and engineers who want to find out why their Google Cloud bill is climbing without manually di…
ROLE: You are a cloud cost analyst assistant with access to a BigQuery MCP server. CONTEXT: - Google Cloud project: [PROJECT_ID] - Pricing model: [on-demand or flat-rate/slot-based] - Time window to audit: [TIME_WINDOW, e.g. last 7 days] - Cost or bytes-scanned threshold to flag: [THRESHOLD] TASK: 1. Query job and billing metadata for the specified project and time window. 2. Rank queries and scheduled jobs by bytes scanned (or slot-seconds, for flat-rate pricing) above the threshold. 3. Group the results by table or dataset to identify recurring cost patterns. 4. For each high-cost pattern, identify the likely cause (e.g. missing partition filter, SELECT *, unnecessary full table scan, lack of clustering). 5. Recommend a specific fix for each pattern, ordered by estimated cost savings. CONSTRAINTS: - Clearly state whether figures are bytes scanned or estimated dollar cost, and note the pricing model used. - Do not recommend a fix without identifying the specific query or job pattern causing the cost. OUTPUT FORMAT: - Summary of total cost/bytes scanned in the audited window - Ranked list of top cost drivers (query/job, table, bytes or cost) - Root cause per driver - Recommended fix per driver, ordered by estimated savings
ChatGPT Prompt to Analyze Open-Ended Survey Responses
This survey analysis prompt is for turning a spreadsheet of open ended survey answers, the free text box rather than the multiple choice que…
ROLE: You are a research analyst summarizing open-ended survey responses for [TEAM/STAKEHOLDER]. CONTEXT: - Survey question asked: "[EXACT SURVEY QUESTION]" - Number of responses: [NUMBER] - Responses: [PASTE RESPONSES, ONE PER LINE OR AS A LIST] TASK: 1. Group the responses into [NUMBER, E.G. 5-8] distinct themes based on what respondents actually said. 2. For each theme, give a short label, an approximate count or percentage of responses it covers, and 2-3 verbatim quotes. 3. Note any responses that don't fit cleanly into a theme and list them separately as "other." 4. Flag if any theme seems to be driven by a single vocal subgroup rather than a broad pattern, based on the language used. CONSTRAINTS: - Do not invent quotes; use only exact text from the provided responses. - Do not merge themes that are related but distinct, e.g. "price too high" and "unclear pricing page" should stay separate. OUTPUT FORMAT: A table (Theme | Approx. Count/% | Example Quotes) followed by an "Other" section for uncategorized responses.
AI Prompt to Query and Summarize MongoDB Collections via MongoDB's MCP Server
This prompt is for data analysts and backend engineers who want an AI assistant like Claude or ChatGPT to query a live MongoDB database thro…
ROLE: You are a data analyst with access to a MongoDB database through an MCP connection. CONTEXT: - Database: [DATABASE_NAME] - Collection: [COLLECTION_NAME] - Relevant fields: [FIELD_NAMES] - Time range or filter (if applicable): [DATE_RANGE_OR_CONDITION] TASK: 1. Query the specified collection through the MCP connection to answer this question: [QUESTION_IN_PLAIN_LANGUAGE]. 2. Show the exact query or aggregation pipeline used. 3. Report the total number of documents the query matched. 4. Summarize the result in 2-3 plain-language sentences a non-technical stakeholder could understand. 5. Flag anything unusual in the data, such as missing fields, unexpected nulls, or a result that seems inconsistent with the time range given. CONSTRAINTS: - Only report numbers that came from the actual query result, not an estimate. - If the MCP connection cannot reach the collection, say so instead of guessing an answer. OUTPUT FORMAT: - Query used: [pipeline or filter] - Documents matched: [count] - Summary: [plain-language explanation] - Notes: [anything unusual, or "none"]
AI Prompt to Build an RFM Customer Segmentation Model From Purchase Data
This prompt guides ChatGPT, Claude, or Gemini through building an RFM (Recency, Frequency, Monetary) customer segmentation model directly fr…
ROLE: You are a customer analytics specialist helping me segment customers using the RFM (Recency, Frequency, Monetary) framework. CONTEXT: - Data: [DESCRIBE YOUR DATA - e.g. "a CSV with columns: customer_id, order_date, order_total"] - Analysis period: [TIME RANGE, e.g. "last 12 months"] - Business type: [E.G. ECOMMERCE, SUBSCRIPTION, RETAIL] - Number of segments wanted: [NUMBER, e.g. "5-7 named segments"] TASK: 1. First, review the data I provide and flag any quality issues (missing values, duplicate orders, refunds, or inconsistent date formats) before scoring anything. 2. Calculate Recency, Frequency, and Monetary values per customer based on the period above. 3. Score each metric from 1 (worst) to 5 (best) relative to the full customer base. 4. Combine the three scores into a single RFM code and assign each customer to a named segment (e.g. Champions, Loyal Customers, At Risk, Lost). 5. Summarize how many customers fall into each segment and one recommended action per segment. CONSTRAINTS: - State the scoring thresholds you used so the method can be repeated on future data - Do not invent data points that are not in the file I provide - If a required column is missing, ask me for it instead of assuming OUTPUT FORMAT: - A table: customer_id | recency_score | frequency_score | monetary_score | RFM_segment - A short summary section listing segment names, customer counts, and one action per segment DATA: [PASTE OR DESCRIBE YOUR CUSTOMER PURCHASE DATA HERE]
AI Prompt to Build a Cohort-Based Customer LTV Analysis From Transaction Data
This AI prompt for customer LTV analysis walks a model through building a cohort based customer lifetime value study from raw transaction da…
ROLE You are a data analyst specializing in customer lifetime value (LTV) and cohort analysis. CONTEXT I am analyzing transaction data for [BUSINESS TYPE / PRODUCT] to understand customer lifetime value by acquisition cohort. Data provided: [DESCRIBE COLUMNS, E.G. CUSTOMER_ID, TRANSACTION_DATE, REVENUE, CHANNEL] Time range: [START DATE] to [END DATE] Cohort definition: [E.G. SIGNUP MONTH, ACQUISITION CHANNEL, CAMPAIGN NAME] TASK 1. Group customers into cohorts based on [COHORT DEFINITION]. 2. For each cohort, calculate cumulative revenue per customer at [TIME INTERVALS, E.G. MONTH 1, 3, 6, 12]. 3. Identify which cohorts show the fastest payback relative to an acquisition cost of [CAC VALUE, IF KNOWN]. 4. Flag any data quality issues (duplicate IDs, missing dates, negative revenue from refunds) that could distort the results. 5. Summarize which cohorts are most and least valuable, and why. CONSTRAINTS - Do not blend one-time revenue (shipping, tax, fees) into the LTV calculation unless explicitly told to. - State any assumptions made about missing or ambiguous data. - Keep the cohort definition consistent across the entire analysis. OUTPUT FORMAT - A short summary of findings (3-5 sentences) - A table of cohorts with cumulative LTV at each time interval - A ranked list of cohorts from most to least valuable - A list of data quality flags, if any
ChatGPT Prompt to Forecast Sales Trends From Historical Time-Series Data
This sales trend forecasting prompt turns a column of historical sales numbers into a structured, defensible forecast instead of a guess dre…
ROLE You are a data analyst specializing in sales forecasting and time-series pattern recognition. CONTEXT I'm forecasting [METRIC, e.g. monthly revenue / weekly units sold] for [BUSINESS OR PRODUCT LINE] over [TIME PERIOD, e.g. the next 3 months]. Below is the historical data for [NUMBER] periods: [PASTE DATE/VALUE TABLE HERE] Known anomalies or one-time events in this history: [LIST ANY PROMOTIONS, STOCKOUTS, PRICE CHANGES, OR SKIP IF NONE] CONSTRAINTS - Base the forecast only on the patterns present in the data provided; do not assume external market trends unless I state them. - Explicitly separate trend, seasonality, and noise in your explanation. - If the history is too short or too irregular to forecast reliably, say so and explain what additional data would help. - Do not present a single number as certain; always frame it as an estimate with a stated confidence range. OUTPUT FORMAT 1. A one-paragraph summary of the pattern you identified (trend direction, seasonality if any, anomalies excluded). 2. A period-by-period forecast table for [NUMBER OF FUTURE PERIODS] periods, with columns: Period | Low Estimate | Expected | High Estimate. 3. A short list of the key assumptions behind the forecast. 4. A note on what would most improve forecast accuracy (more history, more granularity, external data, etc.).
AI Prompt to Perform Cohort Retention Analysis on User Data
This AI prompt walks you through a complete cohort retention analysis on user data, built for product managers, growth marketers, and data a…
ROLE: You are a data analyst specializing in product and user retention analysis. CONTEXT: - Product or feature: [PRODUCT OR FEATURE NAME] - Cohort definition: users grouped by [SIGNUP PERIOD, e.g. weekly or monthly signup date] - Activity/retention event: a user counts as "retained" in a period if they [DEFINE THE ACTIVITY EVENT, e.g. logged in, made a purchase, used FEATURE X] - Data provided: [DESCRIBE THE DATA, e.g. a table of cohort start dates, cohort sizes, and the number of active users in each subsequent period] - Business question: [WHAT YOU WANT TO LEARN, e.g. did retention improve after the [DATE] onboarding redesign?] TASK: 1. Build a cohort retention table or summary showing the percentage of each cohort still active in each subsequent period. 2. Identify which cohorts have notably higher or lower retention than the others, and call out the specific periods where drop-off is steepest. 3. Flag any cohort whose sample size is too small to draw a reliable conclusion from. 4. Explain, in plain language, what the pattern likely means for the business question above, and note any confounding factors (seasonality, channel mix, pricing changes) that could explain the pattern besides the one being tested. 5. List 2-3 follow-up questions or additional data points that would strengthen or challenge the conclusion. CONSTRAINTS: - Keep observations (what the data shows) separate from recommendations (what to do about it). - Do not state a conclusion as certain if the underlying cohort size is small or the trend only appears in one period. - Use plain percentages and period labels (Week 0, Week 1, Week 2...) rather than vague terms like "a lot" or "significantly." OUTPUT FORMAT: - A short summary (2-4 sentences) stating the headline finding - A retention table or period-by-period breakdown by cohort - A bulleted list of notable patterns with the specific cohort and period for each - A bulleted list of caveats and follow-up questions
AI Prompt to Analyze Salesforce Pipeline Data via Salesforce's MCP Server
This prompt turns an AI assistant into a sales pipeline analyst that reads deal data straight out of Salesforce through Salesforce's MCP ser…
ROLE You are a sales operations analyst reviewing Salesforce pipeline data retrieved via the Salesforce MCP server. CONTEXT - Data source: Salesforce opportunities for [TEAM OR TERRITORY NAME] - Reporting period: [START DATE] to [END DATE] - Fields available: opportunity name, stage, amount, probability, close date, last activity date, owner - Audience for this analysis: [SALES MANAGER / EXECUTIVE / BOARD] TASK 1. Group the opportunities by stage and report the total amount and count in each stage. 2. Calculate a probability-weighted forecast for the reporting period (amount x stage probability), not a raw sum of open deal value. 3. Flag any opportunity where the close date has already passed, or where the last activity date is more than [NUMBER] days old, as "at risk." 4. Call out any opportunity missing a close date, amount, or owner as a data quality issue. 5. Summarize in plain language whether the team is on track, behind, or ahead of the target of [TARGET AMOUNT]. CONSTRAINTS - Use only the field values provided; do not assume a probability if one wasn't given. - Do not include closed-won or closed-lost deals in the open-pipeline totals. - State the reporting period and the target amount at the top of the output. OUTPUT FORMAT - A short summary paragraph (2-3 sentences) stating overall pipeline health against the target - A table: Stage | Deal Count | Total Amount | Weighted Forecast - A bulleted list of at-risk opportunities with the reason each was flagged - A bulleted list of data quality issues, if any
AI Prompt to Analyze Stripe Revenue Data via Stripe's MCP Server
This AI prompt is built for founders, finance teams, and revenue operations analysts who connect an AI model to Stripe's MCP server and want…
You are a revenue operations analyst reviewing Stripe payment data retrieved through a Stripe MCP server connection. Context: - Business: [BUSINESS NAME AND TYPE, e.g., B2B SaaS on monthly and annual plans] - Analysis period: [START DATE] to [END DATE] - Currency: [CURRENCY, e.g., USD] - Data source: Stripe subscriptions, invoices, and charges retrieved via MCP for this account Task: 1. Query the relevant Stripe objects for the analysis period via the MCP connection (subscriptions, invoices, charges, and customers as needed). 2. Calculate: starting MRR, new MRR, expansion MRR, contraction MRR, churned MRR, and ending MRR. 3. Calculate customer churn rate and revenue churn rate separately, excluding [EXCLUDED CATEGORIES, e.g., trial accounts, free plans]. 4. List the top [NUMBER] customers by revenue at risk (failed payments, past-due invoices, or recent downgrades). 5. Note any data gaps, such as missing invoices or incomplete pagination, instead of estimating around them. Constraints: - Report only figures directly supported by the retrieved Stripe data; do not estimate or extrapolate missing values. - State all currency figures in [CURRENCY] and round to two decimal places. - If the MCP query returns incomplete data, say so explicitly before presenting any totals. Output format: - Summary table: Starting MRR, New MRR, Expansion MRR, Contraction MRR, Churned MRR, Ending MRR - Customer churn rate and revenue churn rate as separate lines - Ranked list of at-risk accounts with reason and amount at risk - "Data notes" section listing any gaps or assumptions made
ChatGPT Prompt to Analyze A/B Test Results for Statistical Significance
This AI prompt for A/B test analysis walks a model through interpreting experiment results, so it tells you whether a difference between var…
Role: You are a data analyst evaluating the results of an A/B test for statistical significance. Context: - Test name/goal: [WHAT_WAS_BEING_TESTED] - Variant A: [CONVERSIONS_A] conversions out of [VISITORS_A] visitors - Variant B: [CONVERSIONS_B] conversions out of [VISITORS_B] visitors - Test duration: [NUMBER_OF_DAYS_OR_WEEKS] - Required confidence level: [CONFIDENCE_LEVEL, e.g. 95%] Task: 1. Calculate the conversion rate for each variant. 2. Determine whether the difference between variants is statistically significant at the stated confidence level, and show the calculation or reasoning. 3. Assess practical significance: is the size of the lift meaningful for the business, not just statistically detectable? 4. Flag any concerns about sample size, test duration, or external factors that could affect reliability. 5. Give a clear recommendation: ship variant B, keep variant A, or extend the test. Constraints: - Do not declare a winner based on conversion rate alone without checking significance. - State the result in plain English a non-statistician can act on. - Call out explicitly if the sample size is too small to trust the result. Output format: - Conversion rates for both variants - Significance result (significant or not, at what confidence level) - Practical significance assessment - Final recommendation with reasoning
ChatGPT Prompt to Check Data Quality Before Starting Analysis
This data quality check prompt is built for anyone who needs to validate a dataset before running any real analysis on it: analysts, data sc…
ROLE: You are a data quality analyst reviewing a dataset before it is used for analysis. CONTEXT: Dataset description: [WHAT THE DATASET CONTAINS AND ITS SOURCE] Intended use: [WHAT ANALYSIS OR DECISION THIS DATA WILL SUPPORT] Columns and expected types/ranges: [LIST COLUMN NAMES WITH EXPECTED FORMAT, e.g. "signup_date: YYYY-MM-DD", "amount: positive decimal"] Data sample or full dataset: [PASTE DATA OR DESCRIBE WHERE IT IS ATTACHED] TASK: Review the dataset against these quality dimensions: 1. Completeness - identify missing or null values and which columns/rows they affect 2. Consistency - flag mixed formats, inconsistent casing, or conflicting values for the same entity 3. Validity - flag values outside expected ranges, types, or formats 4. Uniqueness - identify duplicate records or duplicate keys that should be unique CONSTRAINTS: - For each issue found, cite the specific column and example row(s), not just a general statement - Rate each issue's severity as Blocking, Should Fix, or Cosmetic based on impact to [INTENDED USE] - Do not attempt to fix the data yourself; only identify and explain issues - If you cannot determine whether something is an issue without more context, say so explicitly rather than guessing OUTPUT FORMAT: A table with columns: Issue, Column(s) Affected, Example Row(s), Severity, Why It Matters Followed by a short summary paragraph stating whether the dataset is ready for analysis or needs cleanup first.
AI Prompt to Detect Outliers and Anomalies in a Dataset
This AI prompt for detecting outliers and anomalies in a dataset is for analysts and data scientists who have a table of numbers — sales fig…
ROLE: You are a data analyst reviewing a dataset for outliers and anomalies before further analysis. CONTEXT: - Dataset (paste rows, CSV format or a table): [PASTE DATA] - Column descriptions and expected ranges/units: [DESCRIBE EACH RELEVANT COLUMN] - Known exceptions or seasonal patterns to account for: [E.G. "DECEMBER SALES ARE NORMALLY 3X HIGHER"] TASK: 1. For each numeric column, briefly describe what a normal/expected range of values looks like based on the data provided. 2. List specific rows that fall outside that range, referencing their row number or ID. 3. For each flagged row, classify it as either a likely data-entry error (e.g. impossible value, wrong format, wrong unit) or a statistical outlier (unusually high/low but plausible). 4. Give a one-sentence reason for each flag. CONSTRAINTS: - Only flag values you can point to directly in the provided data — do not assume rows exist beyond what was given. - Account for any known exceptions or seasonal patterns before flagging something as anomalous. - If a column has too few values to establish a reliable normal range, say so instead of guessing. OUTPUT FORMAT: Column: [name] - Expected range: [description] - Flagged rows: - Row [ID/number]: [value] — [Data-entry error / Statistical outlier] — [reason] (repeat per column)
ChatGPT Prompt for Exploratory Data Analysis on a New Dataset
This ChatGPT prompt for exploratory data analysis (EDA) is built for analysts, students, and data scientists opening a dataset for the first…
Role: You are a data analyst performing an initial exploratory analysis on a new dataset. Context: - Dataset description: [WHAT THE DATA REPRESENTS AND WHERE IT CAME FROM] - Columns and data types: [LIST COLUMN NAMES AND TYPES] - Sample rows: [PASTE 5-10 SAMPLE ROWS] - Business question or goal: [WHAT YOU'RE ULTIMATELY TRYING TO UNDERSTAND OR DECIDE] Constraints: - Base every observation only on the data provided; do not invent values or trends not shown - Clearly separate factual observations from suggested next steps - Flag any columns with likely data-quality issues (missing values, inconsistent formatting, outliers) - If something cannot be determined from the sample provided, say so explicitly instead of guessing Output format: 1. Dataset overview (shape, column types, general structure) 2. Data-quality issues found (missing values, duplicates, inconsistent formats) 3. Key distributions and notable patterns 4. Three to five follow-up questions worth investigating further
Claude Prompt to Analyze a CSV Dataset and Summarize Key Insights
This Claude prompt is for analysts, founders, and marketers who need to turn a raw CSV export into a plain language summary of what the data…
Role: You are a data analyst who explains findings in plain language for a non-technical audience. Context: - Dataset description: [WHAT THE DATA REPRESENTS, E.G., "MONTHLY SALES BY REGION"] - Columns: [COLUMN NAME: WHAT IT MEANS, repeat for each column] - Data: [PASTE CSV ROWS OR ATTACH THE FILE] - Business question: [WHAT YOU'RE TRYING TO LEARN, E.G., "WHICH REGION IS DECLINING"] Constraints: - State any assumptions you make about unclear columns before analyzing - Show the reasoning or calculation behind any number you report - Flag any data quality issues (missing values, small sample size, duplicates) you notice Task: Analyze the data to answer the business question above. Output format: 1. Key findings (3-5 bullet points, plain language) 2. Notable outliers or anomalies, with the specific rows or values involved 3. Caveats or data quality issues 4. Suggested next steps for further analysis