Sub topic 11
Getting Help with Metrics, Spreadsheets, and SQL
Assume you already understand basic product metrics, can use a spreadsheet, and have used a chat-based AI assistant. You do not need to be a SQL expert, but you must know what your tables, columns, and metric definitions mean.
AI can help with data analysis in three main ways:
- Translate a business question into spreadsheet formulas or SQL.
- Explain an existing query, formula, or error message.
- Check calculations, summarize patterns, and suggest follow-up questions.
The assistant does not know your product’s metric definitions unless you provide them. “Active user,” for example, might mean a user who logs in, creates a project, or completes a key event. These definitions produce different numbers.
Give the model a precise analysis task
A useful prompt includes the question, data structure, metric definition, time range, and expected output. For example:
You are helping a product manager analyze activation.
Question: What was the weekly activation rate during January 2026?
Definition: An account is activated when at least one member creates a project within seven days of signup.
Tables:
- accounts(account_id, signup_date)
- projects(project_id, account_id, created_at)
Write a PostgreSQL query. State any assumptions. Do not invent columns.This prompt gives the model enough context to draft a query without asking it to guess your schema.
Here is a query for a different metric, weekly active users:
-- Assumes events(user_id, event_time) and PostgreSQL syntax.
SELECT
DATE_TRUNC('week', event_time) AS week_start,
COUNT(DISTINCT user_id) AS weekly_active_users
FROM events
WHERE event_time >= DATE '2026-01-01'
AND event_time < DATE '2026-02-01'
GROUP BY DATE_TRUNC('week', event_time)
ORDER BY week_start;The query counts each user once per week. It does not prove that the users completed a valuable action. You must check whether the events table and the chosen date boundaries match your reporting rules.
Use AI with spreadsheets
For a spreadsheet, provide the column names, a few representative rows, and the desired result. Ask for a formula that fits your spreadsheet program. You can also ask the assistant to explain each part of the formula.
For example, if column B contains signups and column C contains activated accounts, the activation rate might be:
=IFERROR(C2/B2,0)Format the result as a percentage. Check how the formula handles zero signups, blank cells, duplicate rows, and filtered data.
Verify before relying on the result
Use this checklist:
- Confirm the query runs in your SQL dialect.
- Compare a small sample with a manually calculated result.
- Check filters, time zones, joins, nulls, duplicates, and denominator choice.
- Ask the assistant to list its assumptions.
- Record the metric definition and query beside the reported number.
Exercise
A dashboard reports 42% activation, but your AI-generated query reports 57%. What should you check first?
Show answer
Compare the activation definitions, date range, population, denominator, event timing, joins, and duplicate handling before deciding that either number is correct.