What you'll be able to do
- Turn a plain-English question into working SQL against your schema
- Debug a query that errors or quietly returns the wrong numbers
- Write and fix spreadsheet formulas without trial and error
- Explain a result in plain English for a non-technical stakeholder
- Choose the right chart and sanity-check a number before you ship it
Inside the path
A focused set of five-minute lessons — each one ends with a hands-on exercise, not a quiz you can guess.
Describe the query, give the schema 6 min
The prompt pattern that turns a question into correct SQL — table names, types, and a sample row.
Debug a broken query 5 min
Paste the query, the error or the wrong result, and your schema; get a fix you understand.
Formulas without the fight 5 min
Get the exact spreadsheet formula for a real column layout, with the edge cases handled.
Explain it in plain English 5 min
Turn a result into a clear takeaway for a stakeholder who doesn't read SQL.
Sanity-check before you ship 5 min
The quick tests that catch a query that runs but silently answers the wrong question.
Try a sample exercise
This is the kind of card you'd practice inside Iro — you do the thinking, then get feedback.
◆ Sample exercise · Prompt practice
You need a query for monthly active users over the last six months, but you're in an unfamiliar database. "Write me a SQL query for monthly active users" comes back built on table and column names that don't exist in your schema.
Your task: Pick the prompt that gets you a query you can actually run and trust.
- "Write a SQL query for monthly active users."
- "Write a PostgreSQL query for monthly active users over the last 6 months. Schema: events(user_id BIGINT, event_name TEXT, created_at TIMESTAMP). A user is 'active' in a month if they have at least one event. Sample row: (1024, 'app_open', '2026-03-14 09:02:00'). Return year-month and distinct active users, ordered by month. Explain the query and note how it handles months with zero activity and users in different time zones."
- "Give me the best MAU query."
- "How many active users do we have?"
See why the second prompt wins
The winning prompt names the dialect (PostgreSQL), hands over the exact schema with column types so the model can't invent table names, states the metric definition ("active" = at least one event), and includes a sample row that anchors the data types and date format. It also asks for an explanation and edge-case handling (empty months, time zones) — the details that turn a query that merely runs into one that's actually correct. The vague options force the model to guess your data, which is exactly how you get a confident, wrong answer. In Iro you'd write your own and get feedback on schema, sample rows, and the edge cases you left out.
Why AI is a great pair for data work — and where it lies
Analytics is a sweet spot for AI: the question is easy to say in words, and the answer is a small, testable artifact — a query, a formula, a chart choice. Describe what you want and hand over your schema, and a model like ChatGPT or Claude will write the SQL, fix a #REF! or a broken join, or explain a result to a non-technical stakeholder in plain English.
Where it lies is the details. It invents a column that isn't in your table, gets a join direction wrong, or writes a query that runs cleanly and answers a subtly different question than you asked. None of that means avoid AI — it means give it the real schema and a sample row so it isn't guessing, and sanity-check the output before a dashboard or a decision depends on it.
The prompt that gets correct SQL
The difference between useless and reliable is context. Instead of "write a query for active users," tell the model the database (Postgres, BigQuery, MySQL), the exact tables and column types, how you define the metric, and give it one sample row. Then ask it to explain the query and name the edge cases.
- Schema: table and column names with types, so it can't invent them.
- A sample row: anchors the data types and formats.
- The definition: what "active," "churned," or "revenue" actually means here.
- Explain + edge cases: nulls, duplicates, empty periods, and time zones — so you can read the logic and catch the silent bugs.