You don't need to become an analyst — you need just enough SQL to self-serve simple questions and ask sharper ones of your data team. This path is the high-leverage minimum: filtering, basic KPIs, safe JOINs, the mistakes that quietly produce wrong numbers, and a first funnel query.
Most product decisions hinge on a number someone has to look up — signups this week, retention for a cohort, which variant converted better. This path teaches exactly enough SQL for a PM to answer the simple versions of those questions directly, and to spot when a number someone hands you deserves a second look. It's deliberately narrower than the analyst or engineering paths — the goal is confident self-serve querying, not production-grade data engineering.
A SELECT statement asks a database a question in plain structure: which columns, from
which table. Once you can read one, you can answer a surprising number of "can you quickly check..."
Slack messages yourself, instead of waiting in an analyst's queue for a five-minute lookup.
SELECT name, signup_date, plan
FROM users
LIMIT 20;
LIMIT is your friend when exploring a table for the first time — preview a handful of rows before running anything against the full dataset."How many premium users signed up this quarter?" is a WHERE clause with two conditions
joined by AND. This one clause is behind almost every segment a PM ever asks for — the
trick is being precise about exactly which rows you mean.
SELECT COUNT(*)
FROM users
WHERE plan = 'premium'
AND signup_date >= '2026-01-01';
WHERE filters individual rows before any grouping happens; HAVING filters an already-grouped result — worth knowing the difference before asking for a filtered aggregate.GROUP BY turns a pile of individual rows into a number per segment — signups per day,
average session length per plan. Pair it with ORDER BY to surface the highest or lowest
values first, the ones a stakeholder will ask about.
SELECT plan, AVG(session_length) AS avg_session
FROM sessions
GROUP BY plan
ORDER BY avg_session DESC;
User data and event data almost always live in separate tables. A JOIN connects them
through a shared key like user_id — LEFT JOIN specifically, when you want
every user included even the ones with zero product events yet.
SELECT u.name, u.plan, COUNT(e.id) AS events
FROM users u
LEFT JOIN product_events e ON e.user_id = u.id
GROUP BY u.name, u.plan;
This is the module that saves you from shipping a wrong number in a deck. Joining users to a one-to-many events table without aggregating first can silently multiply a user with 500 events into 500 rows — quietly inflating any "total users" count pulled from that joined result.
COUNT(DISTINCT user_id) and plain COUNT(*) can give wildly different answers on a joined events table — know which one you actually mean before trusting the number.PMs think in buckets — "power users," "at risk," "trial." CASE builds those labels
directly in a query, and you can GROUP BY the label to get a rollup and a segment in a
single step.
SELECT
CASE
WHEN sessions_last_30d >= 20 THEN 'power user'
WHEN sessions_last_30d >= 5 THEN 'active'
ELSE 'at risk'
END AS segment,
COUNT(*) AS users
FROM user_activity
GROUP BY 1;
"Of everyone who signed up, how many activated?" is a funnel question — counting users who cleared each step in an ordered sequence, then comparing step-to-step. It's conditional counting at heart, once you break it down.
The real skill this path builds isn't memorizing syntax — it's knowing what to ask for precisely, spotting an obviously wrong number, and reading a query someone else wrote well enough to sanity-check its logic before you put it in a deck.
Practice these exact patterns on realistic product and business datasets.
Even if you're not interviewing for a technical role, these question banks are a great way to stress-test your own SQL reading comprehension.
Real questions from PM-adjacent and analyst interviews, with worked answers.
The interview.php question bank, filtered to the queries category.
The gentlest starting point in the whole question bank.
25 questions covering everything above. Score 80% or higher to earn your Product Manager badge on your dashboard.
25 questions · pass at 80%+ to earn your Product Manager badge on your dashboard. One-time payment, lifetime access.