Data Analysis Prompts
Prompts for data extraction, analysis, SQL generation, and visualization. This category has 14 ready-made Data Analysis 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 Perform Root Cause Analysis on a Sudden Metric Drop
This root cause analysis prompt helps analysts, product managers, and founders figure out why a key metric — signups, conversion rate, reven…
ROLE: You are a data analyst helping investigate a sudden change in a business metric. CONTEXT: - Metric: [METRIC NAME, e.g. "trial-to-paid conversion rate"] - Normal value: [BASELINE VALUE OR RANGE] - New value: [CURRENT VALUE] - Time window of the drop: [START DATE] to [END DATE] - Relevant data available: [PASTE NUMBERS, A TABLE, OR DESCRIBE THE CHARTS YOU HAVE] - Known changes around this time: [LIST ANY DEPLOYS, CAMPAIGNS, PRICING CHANGES, OR "none known"] - Audience for this analysis: [e.g. "engineering team", "founder", "board update"] TASK: 1. List the most plausible causes for this drop, ordered from most to least likely given the data provided. 2. For each cause, state what evidence in the data supports or weakens it. 3. For each cause, specify the exact additional data or check that would confirm or rule it out. 4. Flag if the drop could simply be normal variance, and explain what would show that. 5. End with a short, plain-language summary suitable for the stated audience. CONSTRAINTS: - Do not state a cause as confirmed unless the provided data directly supports it — use "likely," "possible," or "unconfirmed" language for anything else. - Do not invent data points that were not provided. - Keep the hypothesis list to a maximum of 5 items. OUTPUT FORMAT: A numbered list of hypotheses (most to least likely), each with: supporting/weakening evidence, and the next check to run. Followed by a short summary paragraph.
AI Prompt to Build a Data Dictionary From a Spreadsheet or Database Table
This data dictionary prompt asks ChatGPT, Claude, or Gemini to turn a raw spreadsheet or database table into a clear reference document: eve…
You are a data analyst creating a data dictionary for a dataset so other people can understand and use it correctly. Context: - Source: [e.g., spreadsheet export, PostgreSQL table, CSV file] - Table or sheet name: [NAME] - Audience: [e.g., BI analysts, a new engineer, external partner] Data sample (paste column headers plus 10-20 real rows below): [PASTE SAMPLE DATA HERE] Task: For each column in the sample, produce: 1. Column name as it appears in the source. 2. Inferred data type (string, integer, decimal, date, boolean, categorical, etc.). 3. A one-sentence description of what the column represents, based only on the sample data. 4. Notes on anything unusual: nulls, mixed formats, inconsistent units, likely key or foreign key, or values that look like placeholders. 5. A confidence level (High, Medium, Low) for how certain you are about the description. Constraints: - Do not state a description as certain if the sample doesn't clearly support it; use Medium or Low confidence instead. - Call out any columns that look like duplicates of each other or likely primary/foreign keys in a separate summary section. - Keep descriptions to one sentence each. Output format: A single Markdown table with columns: Column Name | Data Type | Description | Notes | Confidence, followed by a short 'Keys and Relationships' summary section.
AI Prompt to Query and Analyze Supabase Data via Supabase's MCP Server
This prompt is for teams running Claude or ChatGPT with Supabase's MCP server connected, so the model can read a live Postgres database dire…
You are a data analyst with read-only access to a Postgres database through an MCP database connection. Follow these rules for every request: ROLE - Act as a careful analyst who verifies before concluding. CONTEXT - Database: [DATABASE NAME] - Relevant tables: [TABLE NAMES, e.g. users, subscriptions, events] - Business question: [QUESTION, e.g. how many trial users converted to paid in the last 30 days] CONSTRAINTS - Only run read-only SELECT queries. Never run INSERT, UPDATE, DELETE, or DDL statements. - Before answering, list the exact query or queries you plan to run and wait for confirmation if any query touches more than [ROW LIMIT] rows. - If a referenced table or column does not exist, say so explicitly instead of guessing a substitute. - Show a sample of up to 5 returned rows alongside any aggregate numbers. OUTPUT FORMAT 1. Queries run (as SQL) 2. Row counts and sample data 3. Plain-language answer to the business question 4. Any caveats about data quality or missing values Task: [SPECIFIC ANALYSIS REQUEST]
AI Prompt to Find Correlations and Trends Across Multiple Metrics in a Dataset
This prompt is for analysts, marketers, and founders who need to find correlations and trends across multiple metrics in a dataset without w…
Role: You are a data analyst who specializes in identifying patterns across business metrics. Context: - Dataset: [PASTE_DATA_OR_DESCRIBE_COLUMNS] - Metrics to analyze: [LIST_OF_METRIC_COLUMNS] - Time period covered: [TIME_PERIOD] - Business context: [BRIEF_DESCRIPTION_OF_WHAT_THESE_METRICS_MEASURE] Task: Analyze the relationships between the listed metrics and identify: 1. Which pairs of metrics show a notable positive or negative relationship 2. The approximate strength of each relationship (strong, moderate, weak) 3. A plain-language explanation of what the relationship might mean in this business context 4. Any relationship that looks correlated but is more likely coincidental or explained by a third factor Constraints: - Clearly label every finding as correlation, not causation, unless a controlled comparison is explicitly provided - Do not report relationships based on fewer than [MINIMUM_DATA_POINTS] data points - Flag any missing or inconsistent data that could affect the reliability of a finding Output format: A summary paragraph followed by a numbered list of relationships, each with strength, explanation, and a caution note where relevant.
AI Prompt to Standardize Inconsistent Date Formats Across a Dataset
This AI prompt for standardizing date formats helps analysts, ops teams, and anyone who inherits spreadsheets from multiple sources turn a c…
ROLE: You are a meticulous data cleaning assistant specializing in date normalization. CONTEXT: I have a dataset with a column of dates in inconsistent formats. The source systems use these locale conventions: [LIST SOURCE FORMATS, e.g., US month/day/year from System A, European day/month/year from System B]. Here is the raw data: [PASTE DATE VALUES OR ROWS HERE] TASK: 1. Identify the format of each date value. 2. Convert every date to this exact target format: [TARGET FORMAT, e.g., YYYY-MM-DD]. 3. For any date you cannot confidently parse (ambiguous day/month, missing year, invalid date, etc.), do NOT guess — list it separately under "Needs manual review" with a note on why it's ambiguous. CONSTRAINTS: - Do not alter values that are already in the target format. - Treat two-digit years as [YOUR RULE, e.g., 20XX unless clearly 19XX]. - Preserve the original row order. OUTPUT FORMAT: Return a table with three columns: Original Value | Converted Value | Status (Converted / Needs manual review). After the table, list the total count of each status.
AI Prompt to Merge and Reconcile Two Datasets With Mismatched Columns
This AI prompt is for anyone who needs to merge two datasets that don't line up cleanly — different column names, inconsistent formatting, o…
You are a data integration specialist merging two datasets that use inconsistent structures. Context: - Dataset A description: [WHAT DATASET A CONTAINS AND ITS SOURCE] - Dataset A columns: [LIST COLUMN NAMES] - Dataset B description: [WHAT DATASET B CONTAINS AND ITS SOURCE] - Dataset B columns: [LIST COLUMN NAMES] - Field(s) that should uniquely identify a matching record: [E.G. EMAIL, CUSTOMER ID, OR NAME + DATE OF BIRTH] - Dataset A sample: [PASTE DATA HERE] - Dataset B sample: [PASTE DATA HERE] Task: 1. Propose a column mapping between dataset A and dataset B, noting any column in either dataset with no clear equivalent in the other. 2. Normalize formatting differences (dates, currency, capitalization, abbreviations) so matching fields can be compared fairly. 3. Match records between the two datasets using the specified key, and merge matched records into a single row per entity. 4. List any records that could not be confidently matched, along with the reason (missing key, near-duplicate, conflicting data). 5. Flag any records where the same key appears to have conflicting values across the two datasets. Constraints: - Do not force a match when the key fields don't align; list it as unmatched instead - Preserve all original column data in the merged output rather than dropping fields that don't map directly - [ADD ANY DOMAIN-SPECIFIC RULES, E.G. "TREAT 'INC' AND 'INCORPORATED' AS THE SAME COMPANY SUFFIX"] Output format: - A proposed column mapping table (Dataset A column, Dataset B column, Notes) - A merged table of matched records - A separate list of unmatched or conflicting records with the reason for each
AI Prompt to Audit a Notion Database for Data Quality Issues via Notion's MCP Server
This Notion MCP prompt is for operations, data, and RevOps teams who keep a working database in Notion (a CRM tracker, inventory log, projec…
You are a data quality analyst reviewing a live database retrieved via an MCP connection to Notion. Context: - Database name: [DATABASE_NAME] - Approximate number of records: [RECORD_COUNT] - Required properties that must always be filled in: [REQUIRED_PROPERTIES] - Properties with a fixed set of intended values (e.g. Status should only be one of a known list): [CONTROLLED_PROPERTIES_AND_VALUES] Task: Retrieve the records in this database and check them for the following issues: 1. Missing values in required properties 2. Duplicate records (same entity represented more than once) 3. Inconsistent formatting or casing in controlled properties 4. Broken or empty relation fields 5. Date fields that are empty, in the past when they shouldn't be, or otherwise clearly incorrect Constraints: - Only flag issues you can verify from the retrieved data; do not guess at values you cannot see - Group findings by issue type, then by severity (Blocking, Needs Review, Cosmetic) - Include the page title or unique identifier for every flagged record so it can be located in Notion Output format: Return a structured report with one section per issue type. Each section should list affected records as a short table: [Record Name | Issue Description | Suggested Fix]. End with a one-paragraph summary of total issues found and the top priority to address first.
AI Prompt to Audit Google Sheets Formulas for Errors Using Google Workspace's MCP Server
This prompt turns an AI assistant into a spreadsheet auditor that can read a live Google Sheet through Google Workspace's MCP server and sys…
ROLE You are a meticulous spreadsheet auditor with deep expertise in Google Sheets formulas, functions, and data integrity, connected to the live sheet via an MCP server. CONTEXT Spreadsheet name: [SPREADSHEET NAME] Tab/sheet to audit: [TAB NAME] Purpose of this sheet: [WHAT THE SHEET IS USED FOR, e.g. "monthly revenue forecast shared with the finance team"] Known manual-override columns (do not flag as errors): [LIST OF COLUMNS OR "NONE"] Date or version this sheet was last fully reviewed: [DATE OR "NEVER"] TASK Using the MCP connection, read every formula in the specified tab and identify: 1. Broken references (#REF!, #VALUE!, #N/A, #DIV/0! and similar error values) 2. Formulas that reference a range which no longer matches the data (e.g. a SUM or VLOOKUP range that stops short of new rows) 3. Inconsistent logic within a column, where some rows use a formula and others contain a different formula or a hardcoded value with no explanation 4. Circular references or formulas that indirectly depend on their own output CONSTRAINTS - Do not flag the manual-override columns listed above as errors - Quote the exact formula text and cell address for every issue found - Do not rewrite or change any formulas in the sheet; only report findings - If a formula's intent is ambiguous, say so explicitly rather than guessing what it was supposed to do OUTPUT FORMAT Return a table with these columns: Cell Address | Formula Found | Issue Type | Explanation | Suggested Fix (if obvious) Follow the table with a short summary: total issues found, how many are broken references vs. logic inconsistencies, and which columns need the most attention.
AI Prompt to Audit Shopify Inventory and Listings via MCP
This is a prompt for Shopify store owners using Shopify's Admin MCP server , which connects your store's product, inventory, and order data…
Using the Shopify Admin MCP connection to my store, run a catalog audit with these checks: 1. Flag any product with inventory below [STOCK THRESHOLD] units. 2. Flag any product missing [REQUIRED FIELD(S), e.g. description, product type, metafield name]. 3. Flag any product whose tags don't follow this convention: [YOUR TAGGING RULE]. 4. Flag any product with variants that have mismatched or missing pricing. For each flagged product, give me: product name, product ID or handle, the specific issue, and a one-line suggested fix. Group the results by issue type, not by product.
AI Prompt to Segment Customer Data Into Meaningful Groups
This AI prompt for customer segmentation takes a description of your customer dataset and asks the model to propose meaningful groups based…
ROLE You are a data analyst helping design a customer segmentation scheme. CONTEXT Business type: [BUSINESS_TYPE, e.g. subscription SaaS, e-commerce retailer] Available fields: [LIST_OF_FIELDS, e.g. signup_date, last_order_date, total_orders, total_spend, plan_tier] Approximate data ranges: [FIELD_RANGES, e.g. total_orders typically 1-40, last_order_date spans the past 2 years] Business goal for this segmentation: [GOAL, e.g. identify customers to target for a win-back campaign] TASK Propose 4-6 customer segments that serve the stated goal. For each segment, provide: 1. A clear, specific name. 2. The exact rule or threshold on the available fields that defines membership. 3. A one-sentence description of what distinguishes this group. 4. One recommended action specific to this segment. CONSTRAINTS - Only use the fields listed above; do not assume data that wasn't mentioned. - Make segment rules mutually exclusive where possible, and note any customers who might not fit cleanly into any segment. - Keep each segment's rule specific enough to implement as a filter or query. OUTPUT FORMAT A numbered list of segments, each with Name, Rule, Description, and Recommended Action as labeled sub-points, followed by one line noting any edge cases not covered.
ChatGPT Prompt to Convert Plain English Questions Into SQL Queries
This ChatGPT prompt converts a plain English question into a working SQL query , so analysts, product managers, and developers who don't wri…
Role: You are a SQL expert helping me write a query for [DATABASE SYSTEM, e.g. PostgreSQL 15]. Context: - Here is my table schema: [PASTE TABLE NAMES, COLUMNS, AND DATA TYPES] - Relationships between tables: [DESCRIBE FOREIGN KEYS / JOIN LOGIC] Task: Write a SQL query that answers this question: [PLAIN ENGLISH QUESTION, e.g. "which customers placed more than 3 orders in the last 30 days"] Constraints: - Use only the tables and columns listed above - Add a short comment above each major clause explaining what it does - If the question is ambiguous, state your assumption in a comment at the top of the query - Return results sorted by [SORT FIELD] in [ASCENDING/DESCENDING] order Output format: Return only the SQL query in a code block, followed by a 2-3 sentence plain-English explanation of what it returns.
AI Prompt to Find and Remove Duplicate Records in a Dataset
This AI prompt helps you find and remove duplicate records in a dataset, including near duplicates that differ only in casing, spacing, abbr…
Role: You are a data quality analyst reviewing a dataset for duplicate records. Context: - Dataset: [PASTE DATASET OR DESCRIBE FILE AND COLUMNS] - Matching key(s): [FIELDS THAT SHOULD BE TREATED AS THE PRIMARY MATCH, e.g. EMAIL AND LAST NAME] - Secondary fields to consider for near-matches: [E.G. PHONE NUMBER, COMPANY NAME, ADDRESS] - Known formatting inconsistencies: [E.G. SOME ENTRIES HAVE EXTRA SPACES, MIXED CASE, ABBREVIATIONS] Task: 1. Identify rows that are exact duplicates on the matching key(s). 2. Identify rows that are likely duplicates despite minor formatting differences (case, spacing, abbreviation, punctuation). 3. For each duplicate group, recommend which row to keep based on: [RULE, e.g. MOST RECENT DATE, MOST COMPLETE RECORD]. Constraints: - Do not delete or merge any rows yourself — only recommend. - Do not treat records as duplicates solely because one field matches if other key fields clearly conflict. - Flag anything uncertain as "possible duplicate" rather than guessing. Output format: A table with columns: Row ID(s) involved | Match type (exact / likely / possible) | Matching fields | Recommended row to keep | Reason. After the table, list any rows you could not classify confidently and why.
AI Prompt to Clean and Standardize a Messy Spreadsheet Dataset
This is a data cleaning prompt for turning a messy spreadsheet or CSV export into a consistent, analysis ready dataset — built for analysts,…
ROLE: You are a data cleaning assistant helping standardize a spreadsheet dataset for analysis. CONTEXT: Below is a sample of the dataset. Columns are: [LIST OF COLUMN NAMES] [PASTE SAMPLE DATA HERE, INCLUDING KNOWN PROBLEM ROWS] TASK: 1. Review each column and identify formatting inconsistencies (e.g. date formats, capitalization, whitespace, abbreviations, units) 2. Propose and apply a single standard format for each column: [SPECIFY TARGET FORMATS WHERE KNOWN, e.g. dates as YYYY-MM-DD] 3. Flag rows that look like duplicates or outliers, but do not delete them — mark them for my review instead 4. Do not alter these columns without flagging first: [COLUMNS REQUIRING REVIEW BEFORE CHANGES, e.g. customer name, ID numbers] CONSTRAINTS: - Preserve every original row unless I confirm a deletion - Do not invent or infer missing values — leave them blank and flag them - [ANY ADDITIONAL CONSTRAINT, e.g. keep a specific column's original casing] OUTPUT FORMAT: 1. The cleaned dataset as a table 2. A change log listing each column, what inconsistency was found, and what standard was applied 3. A separate list of flagged rows (possible duplicates/outliers) with a one-line reason for each flag
JSON Data Extraction Pipeline
This prompt converts messy, unstructured text (emails, articles, transcripts) into a predictable JSON array that your code can parse without…
Extract the following fields from the text below: [FIELD 1, FIELD 2, FIELD 3, FIELD 4]. Output rules: - Return strictly a JSON array of objects, one per entity found. - Use exactly these keys: [key_1, key_2, key_3, key_4]. - If a value is missing or unclear, use null. Never guess. - Do not wrap the output in markdown code fences. - Do not add any explanation before or after the JSON. Text: """ [PASTE TEXT] """