English → SQL query
Translates a plain-English question into a SQL query — with explanation + assumptions.
Useful for analysts onboarding to a new schema.
The prompt
Copy this into ChatGPT, Claude, Gemini or any assistant you already use — then paste your own question + schema (tables + columns) underneath it.
Convert the question into SQL. Output: **Query** (formatted, runnable) **Assumptions** (which tables / columns you assumed — flag any you guessed) **Edge cases** (NULL, duplicates, time zones) **Sample output shape** (column names + 1 example row) Rules: - Standard SQL unless dialect specified. - Use CTEs over deep subqueries. - Quote column / table names if reserved.
Example input
Question: How many users signed up last month and are still active? Schema: users(id, created_at, last_seen_at).
Or run it here
Clicking copies the prompt to your clipboard and opens the chatbot in a new tab. Gemini doesn't accept URL params — paste manually with Ctrl/Cmd+V.
Related prompts
Breaks a top-line metric (e.g. ARR) into a tree of contributing inputs the team can act on.
Takes a vague stakeholder question and turns it into a precise, answerable analytical query.
Reads cohort data + surfaces retention shape, decay rate, and "is this curve flat enough?".
Given an unexpected metric change, lists 5 most-likely causes + the order to investigate.
Designs a 6-tile dashboard layout for a stakeholder, with each tile's metric + viz type.
Designs an A/B test — hypothesis, variants, primary metric, MDE, sample size, duration.
Browse the full free AI prompt library or see more data & analytics prompts.