← Index15 entries · By Subject
Section VI · Subject Matter

Data prompts

Prompts that translate business questions into SQL, dashboards, and clean analyses.

§ Overview

This category is for turning questions into analysis. The prompts translate a plain-English business question into a clean, commented SQL query, write step-by-step Pandas code for exploratory analysis covering nulls and outliers, build data-cleaning scripts with before/after summaries, and tackle the more advanced ground of SQL window functions. There's also analytical judgment in the mix — analyzing an A/B test for statistical significance with a ship/no-ship call, planning a dashboard with curated KPIs while flagging vanity metrics, and choosing the right chart type for a given dataset.

AI is a strong pair-analyst: it remembers syntax you've forgotten, scaffolds an EDA workflow, and explains the statistics behind a significance test. But it cannot see your data. It will guess at your schema, assume column names, and produce queries that run cleanly while answering the wrong question. The discipline that makes this category safe is simple — give it your real schema and a sample, and validate every result against the numbers before you trust a conclusion.

§ Field Notes

What makes a good data prompt

A good data prompt hands the model your actual schema (table and column names, types, relationships) and a few sample rows, plus the precise business question and any assumptions — what counts as an active user, which date field to use, how to handle nulls. Without the schema, you get plausible SQL that references columns you don't have.

The best prompts also ask for commented code and an explanation of the approach, so you can audit the logic rather than running a black box. For statistical work, have the model state its assumptions and method explicitly; a significance call is only trustworthy when you can see the test it ran.

§ Pro Tips

Get sharper results

  • 01Always paste your real schema and a few sample rows — table names, column types, relationships — or the model will invent columns and write queries that run but answer the wrong question.
  • 02Define your terms in the prompt (what 'active user' means, which date column, how to treat nulls) so the analysis matches your business logic instead of the model's assumptions.
  • 03Ask for commented code plus an explanation of the approach, then validate results by spot-checking against numbers you already know to be true.
  • 04For A/B tests and significance work, make the model state its statistical assumptions and method explicitly so you can judge whether the ship/no-ship call is actually sound.
§ FAQ

Common questions

Can AI write SQL if it can't see my database?

It can, but only well if you give it your schema. Paste the relevant table and column names, types, and relationships, plus a couple of sample rows. With that, it produces clean, commented queries. Without it, you'll get syntactically valid SQL that references columns you don't have or joins the wrong way.

How much can I trust an AI A/B test analysis?

Trust the structure and the statistics it explains, but verify the inputs and assumptions. The model can run significance tests and give a ship/no-ship recommendation, but it relies on the numbers and context you provide. Have it state its assumptions explicitly, and sanity-check the result against the effect size and sample size yourself.

Will AI pick the right chart type and metrics for me?

It gives solid, rationale-backed recommendations and is good at warning against vanity metrics. But it doesn't know what decision your dashboard supports, so describe who's looking and what they need to decide. The right chart depends on the question, and that context lives with you, not the model.

§ The Prompts · 15
№ 019data

Write a SQL Query From a Business Question

Translate a business question into a clean, commented SQL query against your schema.

For
chatgpt·claude
№ 064data

Analyze a Dataset With Pandas Step-by-Step

Generate step-by-step Pandas EDA code covering nulls, outliers, and a business question.

For
claude·chatgpt
№ 065data

Plan a Data Dashboard Layout and Metrics

Plan a full dashboard with curated KPIs, chart types, layout, and vanity-metric warnings.

For
chatgpt·claude·gemini
№ 066data

Write a Data Cleaning Script for Messy Data

Generate a step-by-step Pandas data cleaning script with issue detection and before/after summaries.

For
claude·chatgpt
№ 067data

Analyze an A/B Test for Statistical Significance

Statistically analyze an A/B test result with significance testing and a ship/no-ship recommendation.

For
claude·chatgpt
№ 068data

Choose the Right Chart Type for Your Data

Get a chart type recommendation with rationale, alternatives, and common pitfalls for your data.

For
chatgpt·claude·gemini
№ 078data

Use SQL Window Functions for Advanced Analytics

Generate advanced SQL window function queries with explanations and performance notes.

For
claude·chatgpt
№ 221data

Turn a Plain-English Question Into a SQL Query

Converts a natural-language business question into a correct, commented SQL query grounded in your real schema.

For
chatgpt·claude
№ 222data

Write a Pandas Snippet for a Specific Data Transformation

Generates a vectorized, commented pandas snippet for a precise transformation on your actual DataFrame.

For
chatgpt·claude
№ 223data

Choose the Right Chart Type for Your Data

Recommends the best and runner-up chart type for your message, variables, and audience with encoding guidance.

For
chatgpt·claude
№ 224data

Interpret an A/B Test Result Without Overclaiming

Interprets A/B test numbers honestly, flags validity risks, and gives a ship or keep-running recommendation.

For
chatgpt·claude
№ 225data

Write a Precise, Unambiguous Metric Definition

Produces a precise metric definition with formula, grain, inclusion rules, and resolved edge cases.

For
chatgpt·claude
№ 226data

Build a Data-Cleaning Checklist for a New Dataset

Generates a prioritized, column-specific data-cleaning checklist tailored to your dataset and intended analysis.

For
chatgpt·claude
№ 227data

Write a Dashboard Spec Before You Build It

Drafts a build-ready dashboard spec with KPIs, layout, filters, drill-downs, and out-of-scope guardrails.

For
chatgpt·claude
№ 228data

Explain a Statistical Concept to Non-Technical Stakeholders

Translates a statistical concept into a plain-language explanation tied to a real decision for non-technical stakeholders.

For
chatgpt·claude